### Question:
WebSocketService implements Chain3jService { @Override public void close() { webSocketClient.close(); executor.shutdown(); } WebSocketService(String serverUrl, boolean includeRawResponses);  WebSocketService(WebSocketClient webSocketClient,
                     boolean includeRawResponses);   WebSocketService(WebSocketClient webSocketClient,
                     ScheduledExecutorService executor,
                     boolean includeRawResponses); void connect(); @Override T send(Request request, Class<T> responseType); @Override CompletableFuture<T> sendAsync(
            Request request,
            Class<T> responseType); @Override Observable<T> subscribe(
            Request request,
            String unsubscribeMethod,
            Class<T> responseType); @Override void close();  }### Answer:
@Test public void testCloseWebSocketOnClose() throws Exception { service.close(); verify(webSocketClient).close(); verify(executorService).shutdown(); }