### Question:
StringUtil { public static byte[] hexStr2Bytes(String src) { int m = 0; int n = 0; int l = src.length() / 2; byte[] ret = new byte[l]; for (int i = 0; i < l; i++) { m = i * 2 + 1; n = m + 1; ret[i] = uniteBytes(src.substring(i * 2, m), src.substring(m, n)); } return ret; }  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 testHexStr2Bytes() { assertArrayEquals(new byte[] {40, 74, 127}, StringUtil.hexStr2Bytes("284A7F")); }