ConsumerSingleObserver extends AtomicReference<Disposable> implements SingleObserver<T>, Disposable, LambdaConsumerIntrospection { @Override public boolean hasCustomOnError() { return onError != Functions.ON_ERROR_MISSING; } ConsumerSingleObserver(Consumer<? super T> onSuccess, Consumer<? super Throwable> onError); @Override void onError(Throwable e); @Override void onSubscribe(Disposable d); @Override void onSuccess(T value); @Override void dispose(); @Override boolean isDisposed(); @Override boolean hasCustomOnError();  }
@Test public void onErrorMissingShouldReportNoCustomOnError() { ConsumerSingleObserver<Integer> o = new ConsumerSingleObserver<Integer>(Functions.<Integer>emptyConsumer(), Functions.ON_ERROR_MISSING); assertFalse(o.hasCustomOnError()); }
@Test public void customOnErrorShouldReportCustomOnError() { ConsumerSingleObserver<Integer> o = new ConsumerSingleObserver<Integer>(Functions.<Integer>emptyConsumer(), Functions.<Throwable>emptyConsumer()); assertTrue(o.hasCustomOnError()); }