@Test
public void selectTracks_audioAndVideo_reverseOrderToRenderers_mappedToCorectRenderer()
    throws ExoPlaybackException {

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