@Test public void testSingle() { Observable<Integer> observable = Observable.from(1).single(); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(1); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); }
public static <T> OnSubscribeFunc<T> single( final Observable<? extends T> source) { return single(source, false, null); }
OperationSingle { public static <T> OnSubscribeFunc<T> single( final Observable<? extends T> source) { return single(source, false, null); } }
OperationSingle { public static <T> OnSubscribeFunc<T> single( final Observable<? extends T> source) { return single(source, false, null); }  }
OperationSingle { public static <T> OnSubscribeFunc<T> single( final Observable<? extends T> source) { return single(source, false, null); }  static OnSubscribeFunc<T> single(
            final Observable<? extends T> source); static OnSubscribeFunc<T> singleOrDefault(
            final Observable<? extends T> source, final T defaultValue); }
OperationSingle { public static <T> OnSubscribeFunc<T> single( final Observable<? extends T> source) { return single(source, false, null); }  static OnSubscribeFunc<T> single(
            final Observable<? extends T> source); static OnSubscribeFunc<T> singleOrDefault(
            final Observable<? extends T> source, final T defaultValue);  }