### Question:
WebSocketWrapper { public void close() { if (webSocket != null && webSocket.isOpen()) { webSocket.close(); } } WebSocketWrapper(ChargingStationId chargingStationId, WebSocket webSocket, WampMessageHandler wampMessageHandler,
                            Gson gson); WebSocket getWebSocket(); boolean isOpen(); void close(); void sendMessage(WampMessage wampMessage); void sendResultMessage(WampMessage wampMessage);  }### Answer:
@Test public void closeShouldNotFailOnNullSocket() { WebSocketWrapper wrapper = new WebSocketWrapper(CHARGING_STATION_ID, null, mock(WampMessageHandler.class), gson); wrapper.close(); }