### Question:
TextUtils { public static String bytesToHexDump(byte[] chunk) { if (chunk.length == 0) { return ""; } StringBuilder sb = new StringBuilder(chunk.length * 3); for (byte b : chunk) { String hexString = Integer.toHexString(b & 255); if (hexString.length() == 1) { sb.append('0'); } sb.append(hexString).append(' '); } return sb.substring(0, sb.length() - 1); } private  TextUtils(); static String bytesToHexDump(byte[] chunk);  }### Answer:
@Test public void bytesToHexDump_hello_returns_68_65_6c_6c_6f() { assertThat(bytesToHexDump("hello".getBytes())).isEqualTo("68 65 6c 6c 6f"); }
@Test public void bytesToHexDump_4nulls_returns_00_00_00_00() { assertThat(bytesToHexDump(new byte[]{0, 0, 0, 0})).isEqualTo("00 00 00 00"); }
@Test public void bytesToHexDump_ed_fe_07_returns_ed_fe_07() { assertThat(bytesToHexDump(new byte[]{(byte) 0xed, (byte) 0xfe, 7})).isEqualTo("ed fe 07"); }