public static Map<String, String> splitQuery(URL url) {
        Map<String, String> query_pairs = new LinkedHashMap<>();
        var query = url.getQuery();
        var pairs = query.split("&", -1);
        for (var pair : pairs) {
            var idx = pair.indexOf("=");
            query_pairs.put(CommonHelper.urlEncode(pair.substring(0, idx)), CommonHelper.urlEncode(pair.substring(idx + 1)));
        }
        return query_pairs;
    }
This class is an helper for tests: get a basic web client, parameters from an url, a formatted date, etc.

@author Jerome Leleu
@since 1.0.0
pac4j-core/src/test/java/org/pac4j/core/util/TestsHelper.java