DeferredScalarSubscriber extends DeferredScalarSubscription<R> implements FlowableSubscriber<T> { @Override public void onError(Throwable t) { value = null; actual.onError(t); } DeferredScalarSubscriber(Subscriber<? super R> actual); @Override void onSubscribe(Subscription s); @Override void onError(Throwable t); @Override void onComplete(); @Override void cancel();  }
@Test public void error() { TestSubscriber<Integer> ts = TestSubscriber.create(0L); TestingDeferredScalarSubscriber ds = new TestingDeferredScalarSubscriber(ts); ds.setupDownstream(); ts.assertNoValues(); ds.onError(new TestException()); ts.assertNoValues(); ts.assertError(TestException.class); ts.assertNotComplete(); }