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

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