CallbackCompletableObserver extends AtomicReference<Disposable> implements CompletableObserver, Disposable, Consumer<Throwable>, LambdaConsumerIntrospection { @Override public boolean hasCustomOnError() { return onError != this; } CallbackCompletableObserver(Action onComplete);  CallbackCompletableObserver(Consumer<? super Throwable> onError, Action onComplete); @Override void accept(Throwable e); @Override void onComplete(); @Override void onError(Throwable e); @Override void onSubscribe(Disposable d); @Override void dispose(); @Override boolean isDisposed(); @Override boolean hasCustomOnError();  }
@Test public void emptyActionShouldReportNoCustomOnError() { CallbackCompletableObserver o = new CallbackCompletableObserver(Functions.EMPTY_ACTION); assertFalse(o.hasCustomOnError()); }
@Test public void customOnErrorShouldReportCustomOnError() { CallbackCompletableObserver o = new CallbackCompletableObserver(Functions.<Throwable>emptyConsumer(), Functions.EMPTY_ACTION); assertTrue(o.hasCustomOnError()); }