### Question:
UriQueryParser { public static Map<String, List<String>> getUrlParameters(String url) { try { final Map<String, List<String>> query_pairs = new LinkedHashMap<String, List<String>>(); final String[] pairs = getQuery(url).split("&"); for (String pair : pairs) { final int idx = pair.indexOf("="); final String key = idx > 0 ? URLDecoder.decode(pair.substring(0, idx), "UTF-8") : pair; if (!query_pairs.containsKey(key)) { query_pairs.put(key, new LinkedList<String>()); } final String value = idx > 0 && pair.length() > idx + 1 ? URLDecoder.decode(pair.substring(idx + 1), "UTF-8") : null; query_pairs.get(key).add(value); } return query_pairs; } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }  static String getUrlPath(String uri); static String getQuery(String uri); static Map<String, List<String>> getUrlParameters(String url); static final Pattern URI_PATTERN; }### Answer:
@Test public void test() { String uri = "/stuff/test?param1=itworked&param2=rad&param1=cool"; Map<String, List<String>> params = UriQueryParser.getUrlParameters(uri); assertNotNull(params); assertEquals(2, params.get("param1").size()); assertEquals("itworked", params.get("param1").get(0)); assertEquals("cool", params.get("param1").get(1)); assertEquals(1, params.get("param2").size()); assertEquals("rad", params.get("param2").get(0)); }