IWSControllerMonitor implements IWSController { @Override public void handleClosedConnexion(Session session, CloseReason closeReason) { logger.debug("Decorate websocket, close connexion '{}'", session.getId()); httpSessionManager.removeSession(session); iwse.handleClosedConnexion(session, closeReason); }  @Override void handleOpenConnexion(Session session, EndpointConfig config); @Override void handleClosedConnexion(Session session, CloseReason closeReason);  }
@Test public void testHandleClosedConnection() { System.out.println("handleClosedConnection"); Session session = mock(Session.class); CloseReason closeReason = new CloseReason(CloseReason.CloseCodes.NORMAL_CLOSURE, ""); instance.handleClosedConnexion(session, closeReason); verify(httpSessionManager).removeSession(eq(session)); verify(iwse).handleClosedConnexion(eq(session), eq(closeReason)); }