### Question:
BackgroundRpcListener implements RpcListener { @Override public void listenForResponse(int id, ResponseCallback callback) { log.debug("Added listener for id: {}", id); if (callback != null) { responseCallbacks.put(id, callback); } } BackgroundRpcListener(ExecutorService executorService, ObjectMapper responseObjectMapper); @Override void start(InputStream inputStream); @Override void stop(); @Override void listenForResponse(int id, ResponseCallback callback); @Override void listenForNotifications(NotificationCallback callback); @Override void listenForRequests(RequestCallback callback); static final Logger log; }### Answer:
@Test public void testResponseListenerWithoutStart() throws IOException { prepareSequentialExecutorService(); var requestCallback = Mockito.mock(RpcListener.ResponseCallback.class); backgroundRpcListener.listenForResponse(1, requestCallback); verify(requestCallback, never()).responseReceived(anyInt(), any()); }