Property { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Property other = (Property) obj; if (dataType == null) { if (other.dataType != null) return false; } else if (!dataType.equals(other.dataType)) return false; if (group == null) { if (other.group != null) return false; } else if (!group.equals(other.group)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (renderer == null) { if (other.renderer != null) return false; } else if (!renderer.equals(other.renderer)) return false; if (subGroup == null) { if (other.subGroup != null) return false; } else if (!subGroup.equals(other.subGroup)) return false; if (type == null) { if (other.type != null) return false; } else if (!type.equals(other.type)) return false; return true; } 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 itShouldHaveEqualMethod(){ Property expectedProperty=new Property.Builder("String","delimiter","TEXT") .group("TextProperties") .subGroup("TextSubgroup") .type("System").build(); Property actualProperty=new Property.Builder("String","delimiter","TEXT") .group("TextProperties") .subGroup("TextSubgroup") .type("System").build(); assertTrue(actualProperty.equals(expectedProperty)); }