CodecUtils { public static String urlEncode(String unencoded) { return urlEncode(unencoded, "UTF-8"); }  static byte[] parseBytes(String encodedBytes); static String urlEncode(String unencoded); static String urlEncode(String unencoded, String encoding); static String urlDecode(String encoded); static String urlDecode(String encoded, String encoding); static String formEncode(T x); static String formEncode(T x, String encoding); static String formDecodeStr(String encoded); static String formDecodeStr(String encoded, String encoding); static Parameters formDecode(String encoded, String encoding); static MediaType parseMediaType(String typeStr); static String printMediaType(MediaType mediaType);  }
@Test public void urlEncode() { assertThat(CodecUtils.urlEncode("abcあいうdef")) .isEqualTo("abc%e3%81%82%e3%81%84%e3%81%86def"); }