### Question:
CompletableProcessor extends Completable implements Processor { @Override public void onComplete() { terminate(complete()); }  @Override void onSubscribe(Cancellable cancellable); @Override void onComplete(); @Override void onError(Throwable t); @Override void subscribe(final Subscriber subscriber);  }### Answer:
@Test public void testCompleteBeforeListen() { CompletableProcessor processor = new CompletableProcessor(); processor.onComplete(); rule.listen(processor).verifyCompletion(); }
@Test public void testCompleteAfterListen() { CompletableProcessor processor = new CompletableProcessor(); rule.listen(processor).verifyNoEmissions(); processor.onComplete(); rule.verifyCompletion(); }
@Test public void cancelRemovesListenerAndStillAllowsOtherListenersToBeNotified() { CompletableProcessor processor = new CompletableProcessor(); rule.listen(processor).verifyNoEmissions(); rule2.listen(processor).verifyNoEmissions(); rule.cancel(); processor.onComplete(); rule.verifyNoEmissions(); rule2.verifyCompletion(); }