@Test
public void compose() {

    Flowable.range(1, 5)
    .parallel()
    .compose(new ParallelTransformer<Integer, Integer>() {
        @Override
        public ParallelFlowable<Integer> apply(ParallelFlowable<Integer> pf) {
            return pf.map(new Function<Integer, Integer>() {
                @Override
                public Integer apply(Integer v) throws Exception {
                    return v + 1;
                }
            });
        }
    })
    .sequential()
    .test()
    .assertResult(2, 3, 4, 5, 6);
}