@Test public void testOnErrorAfterOnCompleted() { TestObservable t = new TestObservable(null); Observable<String> st = Observable.create(synchronize(Observable.create(t))); @SuppressWarnings("unchecked") Observer<String> w = mock(Observer.class); @SuppressWarnings("unused") Subscription ws = st.subscribe(w); t.sendOnNext("one"); t.sendOnCompleted(); t.sendOnError(new RuntimeException("bad")); verify(w, times(1)).onNext("one"); verify(w, times(1)).onCompleted(); verify(w, Mockito.never()).onError(any(Throwable.class)); }
public static <T> OnSubscribeFunc<T> synchronize(Observable<? extends T> observable) { return new Synchronize<T>(observable, null); }
OperationSynchronize { public static <T> OnSubscribeFunc<T> synchronize(Observable<? extends T> observable) { return new Synchronize<T>(observable, null); } }
OperationSynchronize { public static <T> OnSubscribeFunc<T> synchronize(Observable<? extends T> observable) { return new Synchronize<T>(observable, null); }  }
OperationSynchronize { public static <T> OnSubscribeFunc<T> synchronize(Observable<? extends T> observable) { return new Synchronize<T>(observable, null); }  static OnSubscribeFunc<T> synchronize(Observable<? extends T> observable); static OnSubscribeFunc<T> synchronize(Observable<? extends T> observable, Object lock); }
OperationSynchronize { public static <T> OnSubscribeFunc<T> synchronize(Observable<? extends T> observable) { return new Synchronize<T>(observable, null); }  static OnSubscribeFunc<T> synchronize(Observable<? extends T> observable); static OnSubscribeFunc<T> synchronize(Observable<? extends T> observable, Object lock);  }