Property { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((dataType == null) ? 0 : dataType.hashCode()); result = prime * result + ((group == null) ? 0 : group.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((renderer == null) ? 0 : renderer.hashCode()); result = prime * result + ((subGroup == null) ? 0 : subGroup.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode()); return result; } private  Property(Builder builder); String getPropertyName(); String getPropertyRenderer(); String getPropertyGroup(); String getPropertySubGroupID(); String getPropertySubGroup(); String getPropertyDataType(); String getPropertyType(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void itShouldGiveAlmostUniqHashCode(){ int expectedHashCode = 790634273; Property property=new Property.Builder("String","delimiter","TEXT") .group("TextProperties") .subGroup("TextSubgroup") .type("System").build(); assertEquals(expectedHashCode,property.hashCode()); }