### Question:
Util { public static String urlEncoder(String s, String charcoding) { if (s == null) return null; try { return URLEncoder.encode(s, charcoding); } catch (Exception e) { } return null; }  static String toStr(byte[] data); static byte[] toBytes(String str); static double convertDouble(String src); static double convertDouble(String src, double defaultValue); static int convertInt(Object obj); static int convertInt(Object obj, int defaultValue); static long convertLong(String src); static long convertLong(String src, long defaultValue); static void trim(StringBuffer sb,char c); static String urlDecoder(String s, String charcoding); static String urlEncoder(String s, String charcoding); static String toEscChar(String s); static String htmlEscapeOnce(String s); static String htmlUnEscapeOnce(String s); static String getPicIdFromUrl(String url); static String getProfileImgUrl(long uid, int size, long iconver, byte gender); static long getVersionFromImgUrl(String imageUrl); static String toEscapeJson(String s);  }### Answer:
@Test public void testUrlEncoder() { assertEquals("%2C",Util.urlEncoder(",", "UTF-8")); }