@Test
public void getTrackSelections_returnsInitialSelection() throws Exception {

  prepareDownloadHelper(downloadHelper);
  List<TrackSelection> selectedText0 =
      downloadHelper.getTrackSelections(/* periodIndex= */ 0, /* rendererIndex= */ 0);
  List<TrackSelection> selectedAudio0 =
      downloadHelper.getTrackSelections(/* periodIndex= */ 0, /* rendererIndex= */ 1);
  List<TrackSelection> selectedVideo0 =
      downloadHelper.getTrackSelections(/* periodIndex= */ 0, /* rendererIndex= */ 2);
  List<TrackSelection> selectedText1 =
      downloadHelper.getTrackSelections(/* periodIndex= */ 1, /* rendererIndex= */ 0);
  List<TrackSelection> selectedAudio1 =
      downloadHelper.getTrackSelections(/* periodIndex= */ 1, /* rendererIndex= */ 1);
  List<TrackSelection> selectedVideo1 =
      downloadHelper.getTrackSelections(/* periodIndex= */ 1, /* rendererIndex= */ 2);
  assertSingleTrackSelectionEquals(selectedText0, trackGroupTextUs, 0);
  assertSingleTrackSelectionEquals(selectedAudio0, trackGroupAudioUs, 0);
  assertSingleTrackSelectionEquals(selectedVideo0, TRACK_GROUP_VIDEO_BOTH, 1);
  assertThat(selectedText1).isEmpty();
  assertSingleTrackSelectionEquals(selectedAudio1, trackGroupAudioUs, 0);
  assertSingleTrackSelectionEquals(selectedVideo1, TRACK_GROUP_VIDEO_SINGLE, 0);
}