@Test
public void testNoMissingBackpressureException() {

    final int m = 4 * 1000 * 1000;
    Flowable<Integer> firehose = Flowable.unsafeCreate(new Publisher<Integer>() {
        @Override
        public void subscribe(Subscriber<? super Integer> t) {
            t.onSubscribe(new BooleanSubscription());
            for (int i = 0; i < m; i++) {
                t.onNext(i);
            }
            t.onComplete();
        }
    });
    TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
    firehose.replay().autoConnect().observeOn(Schedulers.computation()).takeLast(100).subscribe(ts);
    ts.awaitTerminalEvent(3, TimeUnit.SECONDS);
    ts.assertNoErrors();
    ts.assertTerminated();
    assertEquals(100, ts.values().size());
}