### Question:
OAuthUtil { static String createSignatureBaseString(HttpMethod method, String baseUrl, List<? extends Entry<String, String>> allParameters) { StringBuilder signature = new StringBuilder(); String methodName = method.toString().toUpperCase(); signature.append(methodName).append('&'); signature.append(urlEncode(baseUrl)).append('&'); signature.append(urlEncode(createParameterString(allParameters))); return signature.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 testCreateSignatureBaseString() { String signatureBaseString = OAuthUtil.createSignatureBaseString(HTTP_METHOD, BASE_URL, PARAMS); assertEquals(EXPECTED_SIGNATURE_BASE_STRING, signatureBaseString); }