protected void populateContextWithUrl(final MockWebContext context, String url) {
        var pos = url.indexOf("?");
        if (pos >= 0) {
            url = url.substring(pos + 1);

            // removing stuffs after the hash for a regular query string
            pos = url.indexOf("#");
            if (pos >= 0) {
                url = url.substring(0, pos);
            }
        } else {
            // this is a hack to test client side stuffs, it would not work for server side
            pos = url.indexOf("#");
            if (pos >= 0) {
                url = url.substring(pos + 1);
            }
        }
        final Map<String, String> parameters = new HashMap<>();
        val st = new StringTokenizer(url, "&");
        while (st.hasMoreTokens()) {
            val keyValue = st.nextToken();
            val parts = keyValue.split("=");
            if (parts != null && parts.length >= 2) {
                try {
                    parameters.put(parts[0], URLDecoder.decode(parts[1], StandardCharsets.UTF_8.name()));
                } catch (final UnsupportedEncodingException e) {
                    throw new RuntimeException(e);
                }
            }
        }
        context.addRequestParameters(parameters);
    }
Run manually a test for a client.

@author Jerome Leleu
@since 1.9.0
pac4j-core/src/test/java/org/pac4j/core/run/RunClient.java