public VideoSource ResolveVideoSource(string requestUrl)
        {
            string token = GetSourceToken(requestUrl);
            Guid   sourceId;

            if (Guid.TryParse(token, out sourceId))
            {
                return(_videoSourceStorage.GetVideoSourceById(sourceId) ??
                       _videoSourceStorage.GetVideoSourceByCaption(token));
            }

            return(_videoSourceStorage.GetVideoSourceByCaption(token));
        }
 public void GetVideoSourceByCaption_VideoSourceIdExists_ReturnsVideoSource()
 {
     SetupTwoSources();
     Assert.True(_videoSourceStorage.GetVideoSourceByCaption(_videoSourcesFixtures.VideoSourceOne.Caption) == _videoSourcesFixtures.VideoSourceOne);
 }