### Question:
URLCode { public static String Utf8UrlEncode(String text) { StringBuffer result = new StringBuffer(); for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); if (c >= 0 && c <= 255) { result.append(c); } else { byte[] b = new byte[0]; try { b = Character.toString(c).getBytes("UTF-8"); } catch (Exception ex) { } for (int j = 0; j < b.length; j++) { int k = b[j]; if (k < 0) k += 256; result.append("%" + Integer.toHexString(k).toUpperCase()); } } } return result.toString(); }  static String Utf8UrlEncode(String text); static String Utf8UrlDecode(String text); static boolean isUtf8Url(String text);  }### Answer:
@Test public void testUtf8URLencode() { assertEquals(ENCODE_TEXT, URLCode.Utf8UrlEncode(TEXT)); }