TrackedOngoingRequestImpl extends ForwardingOngoingRequest { @Override public void reply(Response<ByteString> message) { doReply(message); } TrackedOngoingRequestImpl(OngoingRequest ongoingRequest, RequestTracker requestTracker); @Override void reply(Response<ByteString> message); @Override void drop();  }
@Test public void shouldNotReplyIfNotTracked() throws Exception { final OngoingRequest trackedOngoingRequest = new TrackedOngoingRequestImpl(ongoingRequest, tracker); tracker.remove(trackedOngoingRequest); trackedOngoingRequest.reply(Response.ok()); verifyNoMoreInteractions(ongoingRequest); }