### Question:
UrlHelper { public static List<Pair<String, String>> parseParams(String parameterString) { Validate.notNull(parameterString, "parameterString must not be null"); List<Pair<String, String>> params = new ArrayList<>(); int questionIdx = parameterString.indexOf("?"); if (questionIdx == -1) { return params; } String paramSubString = parameterString.substring(questionIdx + 1); String[] paramSplit = paramSubString.split("&"); for (String param : paramSplit) { String[] keyValue = param.split("="); String key = tryDecodeParameter(keyValue[0]); String value; if (keyValue.length == 1) { value = StringUtils.EMPTY; } else { value = tryDecodeParameter(param.substring(key.length() + 1)); } params.add(Pair.of(key, value)); } return params; } private  UrlHelper(); static String removeSessionId(String originalUrl); static void makeAbsoluteUrls(Document document); static String getBaseUrl(Document document); static String makeFullUrl(String pageUrl, String baseUrl, String linkUrl); static String makeFullUrl(String contextUrl, String linkUrl); static String getCleanUrl(String url); static String removeAnchors(String url); static String getDomain(String url, boolean includeProtocol, boolean includeSubdomain); static String getDomain(String url, boolean includeProtocol); static String getDomain(String url); static String getCanonicalUrl(String url); static String decodeParameter(String string); static String encodeParameter(String string); static List<String> extractUrls(String text); static boolean isLocalFile(URL url); static String createParameterString(List<Pair<String, String>> parameters); static List<Pair<String, String>> parseParams(String parameterString); static String parseBaseUrl(String url); static boolean isValidUrl(String url); static final Pattern URL_PATTERN; }### Answer:
@Test public void testParseParams() { String url = "http: List<Pair<String, String>> params = UrlHelper.parseParams(url); assertEquals(2, params.size()); assertEquals(Pair.of("search", "San Francisco"), params.get(0)); assertEquals(Pair.of("go", "Artikel"), params.get(1)); url = "https: params = UrlHelper.parseParams(url); assertEquals(5, params.size()); assertEquals(Pair.of("__mk_de_DE", "xxxxxxtag="), params.get(0)); assertEquals(Pair.of("reportType", "earningsReport"), params.get(1)); assertEquals(Pair.of("program", "all"), params.get(2)); assertEquals(Pair.of("deviceType", "all"), params.get(3)); assertEquals(Pair.of("periodTyp", StringUtils.EMPTY), params.get(4)); url = "https: params = UrlHelper.parseParams(url); assertEquals(28, params.size()); url = "http: params = UrlHelper.parseParams(url); assertEquals(1, params.size()); assertEquals(Pair.of("sph", "o_lsteventos_fca=13/11/2015%%a_iap=1351%%a_lsteventos_vrp=0"), params.get(0)); }