MessageProcessor implements Processor<Message<T>, Message<T>>, Subscription { @Override public void onNext(Message<T> t) { if (subscriber != null) { subscriber.onNext(t); } }  @Override void subscribe(Subscriber<? super Message<T>> subscriber); @Override void request(long n); @Override void cancel(); @Override void onNext(Message<T> t); @Override void onError(Throwable t); @Override void onSubscribe(Subscription s); @Override void onComplete();  }
@Test public void onNext() throws Exception { Message<String> message = new Message<>(0, 1L, 2, 3L, "foo"); underTest.subscribe(subscriber); underTest.onNext(message); verify(subscriber).onNext(message); }