### Question:
RequestEncoder { public static String normalizeParametersQuery( final TreeMap<String, String> parameters) throws UnsupportedEncodingException { boolean firstEntry = true; StringBuilder parametersQuery = new StringBuilder(); for (Map.Entry<String, String> entry : parameters.entrySet()) { if (firstEntry) { parametersQuery.append(URLEncoder .encode(entry.getKey(), "UTF-8")).append("=") .append(URLEncoder.encode(entry.getValue(), "UTF-8")); firstEntry = false; } else { parametersQuery.append("&") .append(URLEncoder.encode(entry.getKey(), "UTF-8")) .append("=").append(URLEncoder.encode( entry.getValue(), "UTF-8")); } } return parametersQuery.toString().replace("+", "%20"); } private  RequestEncoder(); static String normalizeParametersQuery(
            final TreeMap<String, String> parameters); static String encodeBaseURI(final String url);  }### Answer:
@Test public void testNormalizeParametersQuery() throws UnsupportedEncodingException { TreeMap<String, String> parameters = new TreeMap<>(); parameters.put("paramB", "value B"); parameters.put("paramA", "value A"); assertEquals(RequestEncoder.normalizeParametersQuery(parameters), "paramA=value%20A&paramB=value%20B"); }