code: public Map<String, List<String>> parseQuery(String query)
      {
          Map<String, List<String>> queryParams = new LinkedHashMap<>();
          if (query != null) {
              for (NameValuePair params : URLEncodedUtils.parse(query, StandardCharsets.UTF_8)) {
                  String name = params.getName();
                  List<String> values = queryParams.get(name);
                  if (values == null) {
                      values = new ArrayList<>();
                      queryParams.put(name, values);
                  }
                  values.add(params.getValue());
              }
          }
          return queryParams;
      }
docs: Parse a query string into a map of key-value pairs.
  
  @param query query string to be parsed
  @return a mapping of parameter names to values suitable e.g. to pass into {@link EscapeTool#url(Map)}