@Test
public void selectTracks_audioAndVideo_sameOrderAsRenderers_mappedToCorectRenderer()
    throws ExoPlaybackException {

  FakeMappingTrackSelector trackSelector = new FakeMappingTrackSelector();
  RendererCapabilities[] rendererCapabilities =
      new RendererCapabilities[] {VIDEO_CAPABILITIES, AUDIO_CAPABILITIES};
  TrackGroupArray trackGroups = new TrackGroupArray(VIDEO_TRACK_GROUP, AUDIO_TRACK_GROUP);
  trackSelector.selectTracks(rendererCapabilities, trackGroups, periodId, TIMELINE);
  trackSelector.assertMappedTrackGroups(/* rendererIndex= */ 0, VIDEO_TRACK_GROUP);
  trackSelector.assertMappedTrackGroups(/* rendererIndex= */ 1, AUDIO_TRACK_GROUP);
}