### Question:
UrlHelper { public static String createParameterString(List<Pair<String, String>> parameters) { Validate.notNull(parameters, "parameters must not be null"); StringBuilder builder = new StringBuilder(); boolean first = true; for (Pair<String, String> pair : parameters) { if (first) { first = false; } else { builder.append('&'); } builder.append(encodeParameter(pair.getKey())); builder.append('='); String value = pair.getValue(); builder.append(encodeParameter(value != null ? value : StringUtils.EMPTY)); } return builder.toString(); } 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 testCreateParameterString() { List<Pair<String, String>> params = new ArrayList<>(); params.add(Pair.of("search", "San Francisco")); params.add(Pair.of("go", "Artikel")); String parameterString = UrlHelper.createParameterString(params); assertEquals("search=San+Francisco&go=Artikel", parameterString); params = new ArrayList<>(); params.add(Pair.of("param", "value")); params.add(Pair.of("emptyParam", StringUtils.EMPTY)); parameterString = UrlHelper.createParameterString(params); assertEquals("param=value&emptyParam=", parameterString); }