### Question:
OAuthUtil { static String createParameterString(List<? extends Entry<String, String>> allParameters) { Collections.sort(allParameters, ENTRY_COMPARATOR); StringBuilder parameterString = new StringBuilder(); boolean first = true; for (Entry<String, String> pair : allParameters) { if (first) { first = false; } else { parameterString.append('&'); } parameterString.append(String.format("%s=%s", urlEncode(pair.getKey()), urlEncode(pair.getValue()))); } return parameterString.toString(); } OAuthUtil(OAuthParams params); HttpRequest2 createSignedRequest(HttpRequest2 httpRequest); String createAuthorization(HttpMethod method, String url, List<? extends Entry<String, String>> params); static final String AUTHORIZATION_HEADER_KEY; }### Answer:
@Test public void testCreateParameterString() { String parameterString = OAuthUtil.createParameterString(PARAMS); assertEquals(EXPECTED_PARAMETER_STRING, parameterString); }