### Question:
SingleProcessor extends Single<T> implements Processor<T, T> { @Override public void onError(final Throwable t) { terminate(TerminalNotification.error(t)); }  @Override void onSubscribe(final Cancellable cancellable); @Override void onSuccess(@Nullable final T result); @Override void onError(final Throwable t); @Override void subscribe(final Subscriber<? super T> subscriber);  }### Answer:
@Test public void testErrorBeforeListen() { SingleProcessor<String> processor = new SingleProcessor<>(); processor.onError(DELIBERATE_EXCEPTION); rule().listen(processor).verifyFailure(DELIBERATE_EXCEPTION); }
@Test public void testErrorAfterListen() { SingleProcessor<String> processor = new SingleProcessor<>(); rule().listen(processor).verifyNoEmissions(); processor.onError(DELIBERATE_EXCEPTION); rule().verifyFailure(DELIBERATE_EXCEPTION); }