@Override
    public void modifyHandshake(final ServerEndpointConfig sec, final HandshakeRequest request, final HandshakeResponse response) {
        HttpSession httpSession = (HttpSession) request.getHttpSession();
        sec.getUserProperties().put(WebsocketListener.CLIENT_IP_NAME, httpSession.getAttribute(WebsocketListener.CLIENT_IP_NAME));
        super.modifyHandshake(sec, request, response);
    }
@Test
    public void testModifyHandshake() {
        WebsocketConfigurator websocketConfigurator = new WebsocketConfigurator();
        ServerEndpointConfig sec = mock(ServerEndpointConfig.class);
        Map<String, Object> userProperties = mock(Map.class);
        when(sec.getUserProperties()).thenReturn(userProperties);
        HandshakeRequest request = mock(HandshakeRequest.class);
        HttpSession httpSession = mock(HttpSession.class);
        when(request.getHttpSession()).thenReturn(httpSession);
        HandshakeResponse response = mock(HandshakeResponse.class);
        websocketConfigurator.modifyHandshake(sec, request, response);
        verify(userProperties).put(WebsocketListener.CLIENT_IP_NAME, httpSession.getAttribute(WebsocketListener.CLIENT_IP_NAME));
    }