@Test
public void cancelOnArrival2() {

    ConnectableFlowable<Integer> cf = PublishProcessor.<Integer>create()
    .replay(Integer.MAX_VALUE);
    cf.test();
    cf
    .autoConnect()
    .test(Long.MAX_VALUE, true)
    .assertEmpty();
}