BluetoothUtil { @NonNull public static String byteArrayToHex(@NonNull byte[] a) { final StringBuilder sb = new StringBuilder(); for (int i = 0; i < a.length; i++) { if (i > 0) { sb.append('-'); } sb.append(String.format("%02x", a[i])); } return sb.toString(); }  @NonNull static String byteArrayToHex(@NonNull byte[] a); static short bytesToShort(byte b1, byte b2); static void sleep(long t);  }
@Test public void byteArrayToHex() { assertEquals("66-6f-6f", BluetoothUtil.byteArrayToHex("foo".getBytes())); }