### Question:
WebSocketClient extends org.java_websocket.client.WebSocketClient { @Override public void onMessage(String s) { try { log.debug("Received message {} from server {}", s, uri); listener.onMessage(s); } catch (Exception e) { log.error("Failed to process message '{}' from server {}", s, uri); } } WebSocketClient(URI serverUri);  WebSocketClient(URI serverUri, Map<String,String> httpHeaders); @Override void onOpen(ServerHandshake serverHandshake); @Override void onMessage(String s); @Override void onClose(int code, String reason, boolean remote); @Override void onError(Exception e); void setListener(WebSocketListener listener);  }### Answer:
@Test public void testNotifyListenerOnMessage() throws Exception { client.onMessage("message"); verify(listener).onMessage("message"); }