@Test @SuppressWarnings("unchecked") public void testSimpleFactoryThrows() { Func0<Future<Observable<Integer>>> func = new Func0<Future<Observable<Integer>>>() { @Override public Future<Observable<Integer>> call() { throw new OperationStartFutureTest.CustomException(); } }; Observable<Integer> result = Async.deferFuture(func); final Observer<Object> observer = mock(Observer.class); result.subscribe(observer); verify(observer, never()).onNext(any()); verify(observer, never()).onCompleted(); verify(observer).onError(any(OperationStartFutureTest.CustomException.class)); }
public static <T> Observable<T> deferFuture(Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync) { return Observable.defer(new DeferFutureFunc0<T>(observableFactoryAsync)); }
OperationDeferFuture { public static <T> Observable<T> deferFuture(Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync) { return Observable.defer(new DeferFutureFunc0<T>(observableFactoryAsync)); } }
OperationDeferFuture { public static <T> Observable<T> deferFuture(Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync) { return Observable.defer(new DeferFutureFunc0<T>(observableFactoryAsync)); } private  OperationDeferFuture(); }
OperationDeferFuture { public static <T> Observable<T> deferFuture(Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync) { return Observable.defer(new DeferFutureFunc0<T>(observableFactoryAsync)); } private  OperationDeferFuture(); static Observable<T> deferFuture(Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync); static Observable<T> deferFuture(
            Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync,
            Scheduler scheduler); }
OperationDeferFuture { public static <T> Observable<T> deferFuture(Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync) { return Observable.defer(new DeferFutureFunc0<T>(observableFactoryAsync)); } private  OperationDeferFuture(); static Observable<T> deferFuture(Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync); static Observable<T> deferFuture(
            Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync,
            Scheduler scheduler);  }