@Override
    public String toString() {
        return toStringHelper(getClass())
                .add("hardwareType", Short.toString(hardwareType))
                .add("protocolType", Short.toString(protocolType))
                .add("hardwareAddressLength", Byte.toString(hardwareAddressLength))
                .add("protocolAddressLength", Byte.toString(protocolAddressLength))
                .add("opCode", Short.toString(opCode))
                .add("senderHardwareAddress", MacAddress.valueOf(senderHardwareAddress))
                .add("senderProtocolAddress", Ip4Address.valueOf(senderProtocolAddress))
                .add("targetHardwareAddress", MacAddress.valueOf(targetHardwareAddress))
                .add("targetProtocolAddress", Ip4Address.valueOf(targetProtocolAddress))
                .toString();
    }
@Test
    public void testToStringArp() throws Exception {
        ARP arp = deserializer.deserialize(byteHeader, 0, byteHeader.length);
        String str = arp.toString();
        assertTrue(StringUtils.contains(str, "hardwareAddressLength=" + hwAddressLength));
        assertTrue(StringUtils.contains(str, "protocolAddressLength=" + protoAddressLength));
        assertTrue(StringUtils.contains(str, "senderHardwareAddress=" + srcMac));
        assertTrue(StringUtils.contains(str, "senderProtocolAddress=" + srcIp));
        assertTrue(StringUtils.contains(str, "targetHardwareAddress=" + targetMac));
        assertTrue(StringUtils.contains(str, "targetProtocolAddress=" + targetIp));
    }