@Override
    public String getRequestURL() {
        val url = request.getRequestURL().toString();
        var idx = url.indexOf('?');
        if (idx != -1) {
            return url.substring(0, idx);
        }
        return url;
    }
@Test
    public void testGetRequestUrl() throws Exception {
        when(request.getRequestURL()).thenReturn(new StringBuffer("https://pac4j.org?name=value&name2=value2"));
        WebContext context = new JEEContext(request, response);
        assertEquals("https://pac4j.org", context.getRequestURL());
    }