@Test
public void dispose() {

    TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
    SafeSubscriber<Integer> so = new SafeSubscriber<Integer>(ts);
    BooleanSubscription d = new BooleanSubscription();
    so.onSubscribe(d);
    ts.dispose();
    assertTrue(d.isCancelled());
      assertTrue(so.isDisposed());
}