@Test
public void testOnNextAfterUnSubscribe() {

    TestObservable t = new TestObservable(null);
    Observable<String> st = Observable.create(synchronize(Observable.create(t)));
    @SuppressWarnings("unchecked")
    Observer<String> w = mock(Observer.class);
    Subscription ws = st.subscribe(w);
    t.sendOnNext("one");
    ws.unsubscribe();
    t.sendOnNext("two");
    verify(w, times(1)).onNext("one");
    verify(w, Mockito.never()).onNext("two");
}