### Question:
OAuthUtil { static String urlEncode(String string) { return UrlHelper.encodeParameter(string).replace("+", "%20").replace("*", "%2A").replace("%7E", "~"); } 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 testUrlEncode() { assertEquals("Ladies%20%2B%20Gentlemen", OAuthUtil.urlEncode("Ladies + Gentlemen")); assertEquals("An%20encoded%20string%21", OAuthUtil.urlEncode("An encoded string!")); assertEquals("Dogs%2C%20Cats%20%26%20Mice", OAuthUtil.urlEncode("Dogs, Cats & Mice")); assertEquals("%E2%98%83", OAuthUtil.urlEncode("☃")); }