### Question:
ByteBufUtils { public static String macAddressToString(final byte[] address) { Preconditions.checkArgument(address.length == EncodeConstants.MAC_ADDRESS_LENGTH); final StringBuilder sb = new StringBuilder(17); appendHexByte(sb, address[0]); for (int i = 1; i < EncodeConstants.MAC_ADDRESS_LENGTH; i++) { sb.append(':'); appendHexByte(sb, address[i]); } return sb.toString(); } 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(expected=IllegalArgumentException.class) public void testMacToString() { Assert.assertEquals("Wrong string decoded", "00:01:02:03:FF:05", ByteBufUtils.macAddressToString(new byte[]{0, 1, 2, 3, (byte) 255, 5})); ByteBufUtils.macAddressToString(new byte[]{0, 1, 2, 3, (byte) 255, 5, 6}); }