@Test
public void dispose() {

    TestObserver<Integer> to = new TestObserver<Integer>();
    SerializedObserver<Integer> so = new SerializedObserver<Integer>(to);
    Disposable d = Disposables.empty();
    so.onSubscribe(d);
    assertFalse(so.isDisposed());
    to.cancel();
    assertTrue(so.isDisposed());
    assertTrue(d.isDisposed());
}