@Test
public void onSubscribe() {

    BehaviorSubject<Object> p = BehaviorSubject.create();
    Disposable bs = Disposables.empty();
    p.onSubscribe(bs);
    assertFalse(bs.isDisposed());
    p.onComplete();
    bs = Disposables.empty();
    p.onSubscribe(bs);
    assertTrue(bs.isDisposed());
}