@SuppressWarnings("unchecked")
@Test
public void badParallelismStage2() {

    TestSubscriber<Integer> ts1 = new TestSubscriber<Integer>();
    TestSubscriber<Integer> ts2 = new TestSubscriber<Integer>();
    TestSubscriber<Integer> ts3 = new TestSubscriber<Integer>();
    Flowable.range(1, 10)
    .parallel(2)
    .subscribe(new Subscriber[] { ts1, ts2, ts3 });
    ts1.assertFailure(IllegalArgumentException.class);
    ts2.assertFailure(IllegalArgumentException.class);
    ts3.assertFailure(IllegalArgumentException.class);
}