LutronHomeWorksAddress { @Override public int hashCode() { int hash = addressElements.length; for (int i = 0; i < addressElements.length; i++) { hash += addressElements[i]; } return hash; } LutronHomeWorksAddress(String addressRepresentation); @Override String toString(); boolean isValidKeypadAddress(); boolean isValidDimmerAddress(); boolean isValidGrafikEyeAddress(); boolean isValidGrafikEyeSingleZoneAddress(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testAddressEquality() throws InvalidLutronHomeWorksAddressException { Assert.assertEquals(new LutronHomeWorksAddress("[1:6:1:3:2]"), new LutronHomeWorksAddress("[1:6:1:3:2]")); Assert.assertEquals(new LutronHomeWorksAddress("01.6.01.3/2]"), new LutronHomeWorksAddress("[1:6:1:3:2]")); Assert.assertEquals(new LutronHomeWorksAddress("[1:6:1:3:2]").hashCode(), new LutronHomeWorksAddress("[1:6:1:3:2]").hashCode()); Assert.assertEquals(new LutronHomeWorksAddress("01.6.01.3/2]").hashCode(), new LutronHomeWorksAddress("[1:6:1:3:2]").hashCode()); }