### Question:
StringUtil { public static String hexStr2Str(String hexStr) { String str = "0123456789ABCDEF"; char[] hexs = hexStr.toCharArray(); byte[] bytes = new byte[hexStr.length() / 2]; for (int i = 0; i < bytes.length; i++) { int n = str.indexOf(hexs[(2 * i)]) * 16; n += str.indexOf(hexs[(2 * i + 1)]); bytes[i] = ((byte) (n & 0xFF)); } return new String(bytes); }  static String getMiddleString(String text, String lStr, String rStr); static String deleteCRLFOnce(String input); static String str2HexStr(String str); static String hexStr2Str(String hexStr); static String byte2HexStr(byte[] b); static byte[] hexStr2Bytes(String src); static String str2Unicode(String strText); static String unicode2Str(String hex); static String delTagsFContent(String content); static String formatSize(double size); static String getEncoding(byte[] bytes); static List<Node> getFileList(Torrent torrent); static CodepageDetectorProxy detector; }### Answer:
@Test public void testHexStr2Str() { assertEquals("foo", StringUtil.hexStr2Str("666F6F")); }