@Test
public void testFromWithDelayMultiple() {

    final List<Observable<Object>> chunks = Arrays.asList(
            Observable.just(A).delay(1, TimeUnit.MILLISECONDS, testScheduler),
            Observable.just(B, C, D),
            Observable.just(E));
    Observable<Object> observable = ObservableExt.fromWithDelay(chunks, DELAY_MS, TimeUnit.MILLISECONDS, testScheduler);
    observable = observable.defaultIfEmpty(B);
    observable.subscribe(testSubscriber);
    // Nothing is available yet. The first element arrives after 1 ms because
    // of the delay on the just(A).
    assertThat(testSubscriber.takeNext()).isNull();
    assertThat(1).isLessThan(DELAY_MS);
    testScheduler.advanceTimeBy(1, TimeUnit.MILLISECONDS);
    // Now that we've waited the 1 ms delay, A should be available. Note
    // that fromWithDelay() should not delay the first element by DELAY_MS.
    assertThat(testSubscriber.takeNext()).isSameAs(A);
    assertThat(testSubscriber.takeNext()).isNull();
    testScheduler.advanceTimeBy(DELAY_MS, TimeUnit.MILLISECONDS);
    assertThat(testSubscriber.takeNext()).isSameAs(B);
    assertThat(testSubscriber.takeNext()).isSameAs(C);
    assertThat(testSubscriber.takeNext()).isSameAs(D);
    assertThat(testSubscriber.takeNext()).isNull();
    testScheduler.advanceTimeBy(DELAY_MS, TimeUnit.MILLISECONDS);
    assertThat(testSubscriber.takeNext()).isSameAs(E);
    assertThat(testSubscriber.takeNext()).isNull();
}