@Test
public void testChildSourceIsPreparedWithLazyPreparationAfterPeriodCreation() throws IOException {

  FakeMediaSource[] childSources = createMediaSources(/* count= */ 2);
  mediaSource =
      new ConcatenatingMediaSource(
          /* isAtomic= */ false,
          /* useLazyPreparation= */ true,
          new DefaultShuffleOrder(0),
          childSources);
  testRunner = new MediaSourceTestRunner(mediaSource, /* allocator= */ null);
  Timeline timeline = testRunner.prepareSource();
  testRunner.createPeriod(
      new MediaPeriodId(
          timeline.getUidOfPeriod(/* periodIndex= */ 0), /* windowSequenceNumber= */ 0));
  assertThat(childSources[0].isPrepared()).isTrue();
  assertThat(childSources[1].isPrepared()).isFalse();
}