@Test
public void flatMapTwoNestedSync() {

    for (final int n : new int[] { 1, 1000, 1000000 }) {
        TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
        Flowable.just(1, 2).flatMap(new Function<Integer, Flowable<Integer>>() {
            @Override
            public Flowable<Integer> apply(Integer t) {
                return Flowable.range(1, n);
            }
        }).subscribe(ts);
        System.out.println("flatMapTwoNestedSync >> @ " + n);
        ts.assertNoErrors();
        ts.assertComplete();
        ts.assertValueCount(n * 2);
    }
}