public void SearchTextIsContainedTest()
        {
            var viewModel = Container.GetExportedValue<PlaylistViewModel>();
            var view = Container.GetExportedValue<MockPlaylistView>();
            PlaylistItem scrollIntoViewItem = null;
            view.ScrollIntoViewStub = x => scrollIntoViewItem = x;

            var musicFiles = new[]
            {
                CreateMockMusicFile(@"C:\Music\Foo.mp3", "1 title", "1 artist"),
                CreateMockMusicFile(@"C:\Music\Baz.wma", "2 TiTle", "2 ArTisT"),
                CreateMockMusicFile(@"C:\Music\Abc.mp3", "3 TITLE", "3a artist", "3B ARTIST"),
                new MusicFile(x => Task.FromResult((MusicMetadata)null), "do not load"),
            };
            var playlistManager = new PlaylistManager();
            playlistManager.AddAndReplaceItems(musicFiles.Select(x => new PlaylistItem(x)));
            viewModel.PlaylistManager = playlistManager;

            viewModel.SearchText = "1 TIT";
            Assert.AreEqual(playlistManager.Items[0], viewModel.SelectedPlaylistItem);
            Assert.AreEqual(playlistManager.Items[0], scrollIntoViewItem);

            viewModel.SearchText = "1 ART";
            Assert.AreEqual(playlistManager.Items[0], viewModel.SelectedPlaylistItem);
            Assert.AreEqual(playlistManager.Items[0], scrollIntoViewItem);

            viewModel.SearchText = "3B art";
            Assert.AreEqual(playlistManager.Items[2], viewModel.SelectedPlaylistItem);
            Assert.AreEqual(playlistManager.Items[2], scrollIntoViewItem);

            // File name is not considered as Title & Artist are set and shown.
            scrollIntoViewItem = null;
            viewModel.SearchText = "baz";
            Assert.AreEqual(playlistManager.Items[2], viewModel.SelectedPlaylistItem);
            Assert.IsNull(scrollIntoViewItem);

            // Ensure that the search feature does not load the metadata of all Playlist items.
            Assert.IsFalse(musicFiles.Last().IsMetadataLoaded);
        }