LambdaObserver extends AtomicReference<Disposable> implements Observer<T>, Disposable, LambdaConsumerIntrospection { @Override public boolean hasCustomOnError() { return onError != Functions.ON_ERROR_MISSING; } LambdaObserver(Consumer<? super T> onNext, Consumer<? super Throwable> onError,
            Action onComplete,
            Consumer<? super Disposable> onSubscribe); @Override void onSubscribe(Disposable s); @Override void onNext(T t); @Override void onError(Throwable t); @Override void onComplete(); @Override void dispose(); @Override boolean isDisposed(); @Override boolean hasCustomOnError();  }
@Test public void onErrorMissingShouldReportNoCustomOnError() { LambdaObserver<Integer> o = new LambdaObserver<Integer>(Functions.<Integer>emptyConsumer(), Functions.ON_ERROR_MISSING, Functions.EMPTY_ACTION, Functions.<Disposable>emptyConsumer()); assertFalse(o.hasCustomOnError()); }
@Test public void customOnErrorShouldReportCustomOnError() { LambdaObserver<Integer> o = new LambdaObserver<Integer>(Functions.<Integer>emptyConsumer(), Functions.<Throwable>emptyConsumer(), Functions.EMPTY_ACTION, Functions.<Disposable>emptyConsumer()); assertTrue(o.hasCustomOnError()); }