@Test
public void flatMapIntPassthruAsync() {

    for (int i = 0;i < 1000; i++) {
        TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
        Flowable.range(1, 1000).flatMap(new Function<Integer, Flowable<Integer>>() {
            @Override
            public Flowable<Integer> apply(Integer t) {
                return Flowable.just(1).subscribeOn(Schedulers.computation());
            }
        }).subscribe(ts);
        ts.awaitTerminalEvent(5, TimeUnit.SECONDS);
        ts.assertNoErrors();
        ts.assertComplete();
        ts.assertValueCount(1000);
    }
}