@Override
    public String getHeader(String name) {
        // The browser javascript WebSocket client couldn't add the auth param to the request header, use the
        // query param `token` to transport the auth token for the browser javascript WebSocket client.
        if (name.equals(HTTP_HEADER_NAME)
                && !((UpgradeHttpServletRequest) this.getRequest()).getHeaders().containsKey(HTTP_HEADER_NAME)) {
            String token = getRequest().getParameter(TOKEN);
            if (token != null && !token.startsWith(HTTP_HEADER_VALUE_PREFIX)) {
                return HTTP_HEADER_VALUE_PREFIX + token;
            }
            return token;
        }
        return super.getHeader(name);
    }
@Test
    public void testTokenParamWithBearerPrefix() {
        UpgradeHttpServletRequest httpServletRequest = Mockito.mock(UpgradeHttpServletRequest.class);
        Mockito.when(httpServletRequest.getParameter(WebSocketHttpServletRequestWrapper.TOKEN))
                .thenReturn(BEARER_TOKEN);

        WebSocketHttpServletRequestWrapper webSocketHttpServletRequestWrapper =
                new WebSocketHttpServletRequestWrapper(httpServletRequest);
        Assert.assertEquals(
                webSocketHttpServletRequestWrapper.getHeader(WebSocketHttpServletRequestWrapper.HTTP_HEADER_NAME),
                BEARER_TOKEN);
    }