### Question:
StringUtils { public static String toHexString(byte[] bytes) { final StringBuilder sb = new StringBuilder(bytes.length * 2); for (byte b : bytes) { byteToHex(b, sb); } return sb.toString(); } private  StringUtils(); static boolean isEmpty(String str); static Predicate<String> notEmpty(); static boolean isEmpty(List<String> list); static String diff(String str1, String str2); static String getFirstFound(String contents, String regex); static String addDefaultPortIfMissing(String urlString); static String addDefaultPortIfMissing(String urlString, String defaultPort); static String capitalize(String name); static String uncapitalize(String str); static byte[] toBytesUTF8(String str); static byte[] toBytesASCII(String str); static byte[] toBytes(String str, String enc); static String toHexString(byte[] bytes);  }### Answer:
@Test public void testToHexString() { byte[] bytes = new byte[] {Byte.MIN_VALUE, 0x20, Byte.MAX_VALUE, 0x00, (byte) 0xFF}; String hexString = StringUtils.toHexString(bytes); assertEquals(bytes.length * 2, hexString.length()); }