public void testConstructor() {
assertEquals(DHCPConstants.HTYPE_ETHER, ha.getHardwareType());
assertEquals("001122334455", ha.getHardwareAddressHex());
assertTrue(Arrays.equals(HexUtils.hexToBytes("001122334455"), ha.getHardwareAddress()));
HardwareAddress ha2 = new HardwareAddress(DHCPConstants.HTYPE_ETHER, HexUtils.hexToBytes("001122334455"));
assertEquals(ha, ha2);
HardwareAddress ha3 = new HardwareAddress(HexUtils.hexToBytes("001122334455"));
assertEquals(ha, ha3);
HardwareAddress ha4 = new HardwareAddress("001122334455");
assertEquals(ha, ha4);
HardwareAddress ha5 = new HardwareAddress(DHCPConstants.HTYPE_FDDI, HexUtils.hexToBytes("001122334455"));
assertFalse(ha.equals(ha5));
assertTrue(ha.hashCode() != 0);
assertEquals(ha.hashCode(), ha2.hashCode());
assertEquals(ha.hashCode(), ha3.hashCode());
assertEquals(ha.hashCode(), ha4.hashCode());
assertTrue(ha.hashCode() != ha5.hashCode());
assertFalse(ha.equals(null));
assertFalse(ha.equals(new Object()));
}