### Question:
ByteBufUtils { public static String bytesToHexString(final byte[] array) { StringBuilder sb = new StringBuilder(); for (byte element : array) { sb.append(String.format(" %02x", element)); } return sb.toString().trim(); } private  ByteBufUtils(); static String byteBufToHexString(final ByteBuf bb); static byte[] hexStringToBytes(final String hexSrc); static byte[] hexStringToBytes(final String hexSrc, final boolean withSpaces); static ByteBuf hexStringToByteBuf(final String hexSrc); static void hexStringToByteBuf(final String hexSrc, final ByteBuf out); @Deprecated static void padBuffer(final int length, final ByteBuf out); static void writeOFHeader(final byte msgType, final E message, final ByteBuf out, final int length); static void updateOFHeaderLength(final ByteBuf out); static void updateOFHeaderLength(final ByteBuf out, int index); static int fillBitMaskFromMap(final Map<Integer, Boolean> booleanMap); static int fillBitMask(final int offset, final boolean... values); static int[] fillBitMaskFromList(final List<Boolean> booleanList); static String bytesToHexString(final byte[] array); static byte[] macAddressToBytes(final String macAddress); static String macAddressToString(final byte[] address); static String decodeNullTerminatedString(final ByteBuf rawMessage, final int length); static String readIpv4Address(final ByteBuf buf); static String readIpv6Address(final ByteBuf buf); static Ipv4Address readIetfIpv4Address(final ByteBuf buf); static Ipv6Address readIetfIpv6Address(final ByteBuf buf); static MacAddress readIetfMacAddress(final ByteBuf buf); static byte[] serializeList(final List<Short> list); static final Splitter DOT_SPLITTER; static final Splitter COLON_SPLITTER; }### Answer:
@Test public void testBytesToHexString() { byte[] array = new byte[]{10, 11, 12, 13, 14, 15, 16}; Assert.assertEquals("Wrong conversion", "0a 0b 0c 0d 0e 0f 10", ByteBufUtils.bytesToHexString(array)); byte[] empty = new byte[0]; Assert.assertEquals("Wrong conversion", "", ByteBufUtils.bytesToHexString(empty)); }