@Test
public void cancelUpfront() {

    final BlockingFirstSubscriber<Integer> bf = new BlockingFirstSubscriber<Integer>();
    final AtomicBoolean b = new AtomicBoolean();
    bf.cancelled = true;
    Subscription s = new Subscription() {
        @Override
        public void request(long n) {
            b.set(true);
        }
        @Override
        public void cancel() {
        }
    };
    bf.onSubscribe(s);
    assertFalse(b.get());
}