@Test
public void selectTracks_multipleMetadataTracks_mappedToDifferentRenderers()
    throws ExoPlaybackException {

  FakeMappingTrackSelector trackSelector = new FakeMappingTrackSelector();
  TrackGroupArray trackGroups =
      new TrackGroupArray(VIDEO_TRACK_GROUP, METADATA_TRACK_GROUP, METADATA_TRACK_GROUP);
  RendererCapabilities[] rendererCapabilities =
      new RendererCapabilities[] {
        VIDEO_CAPABILITIES, METADATA_CAPABILITIES, METADATA_CAPABILITIES
      };
  trackSelector.selectTracks(rendererCapabilities, trackGroups, periodId, TIMELINE);
  trackSelector.assertMappedTrackGroups(0, VIDEO_TRACK_GROUP);
  trackSelector.assertMappedTrackGroups(1, METADATA_TRACK_GROUP);
  trackSelector.assertMappedTrackGroups(2, METADATA_TRACK_GROUP);
}