@Test public void testNotificationListenerWithoutStart() throws IOException { prepareSequentialExecutorService(); var notificationCallback = Mockito.mock(RpcListener.NotificationCallback.class); backgroundRpcListener.listenForNotifications(notificationCallback); verify(notificationCallback, never()).notificationReceived(any()); }
@Override public void listenForNotifications(NotificationCallback callback) { log.debug("Added notification listener"); this.notificationCallback = callback; }
BackgroundRpcListener implements RpcListener { @Override public void listenForNotifications(NotificationCallback callback) { log.debug("Added notification listener"); this.notificationCallback = callback; } }
BackgroundRpcListener implements RpcListener { @Override public void listenForNotifications(NotificationCallback callback) { log.debug("Added notification listener"); this.notificationCallback = callback; } BackgroundRpcListener(ExecutorService executorService, ObjectMapper responseObjectMapper); }
BackgroundRpcListener implements RpcListener { @Override public void listenForNotifications(NotificationCallback callback) { log.debug("Added notification listener"); this.notificationCallback = 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); }
BackgroundRpcListener implements RpcListener { @Override public void listenForNotifications(NotificationCallback callback) { log.debug("Added notification listener"); this.notificationCallback = 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; }