WSEndpoint { @OnOpen public void handleOpenConnexion(Session session, EndpointConfig config) throws IOException { getWSController().handleOpenConnexion(session, config); }  @OnOpen void handleOpenConnexion(Session session, EndpointConfig config); @OnError void onError(Session session, Throwable t); @OnClose void handleClosedConnexion(Session session, CloseReason closeReason); @OnMessage void receiveCommandMessage(Session client, String json);  }
@Test public void testHandleOpenConnexion() throws Exception { System.out.println("handleOpenConnexion"); Session session = mock(Session.class); EndpointConfig config = mock(EndpointConfig.class); WSController wSController = mock(WSController.class); doReturn(wSController).when(instance).getWSController(); instance.handleOpenConnexion(session, config); verify(wSController).handleOpenConnexion(eq(session), eq(config)); }