ZObjectProperty implements Cloneable, Serializable { @Override public boolean equals(Object other) { if (!(other instanceof ZObjectProperty)) { return false; } ZObjectProperty that = (ZObjectProperty) other; boolean equal = this.objectProperty.equals(that.objectProperty); if (this.objectPropertyType != null && that.objectPropertyType != null) { equal = equal && this.objectPropertyType.equals(that.objectPropertyType); } if (this.objectPropertyCardinality != null && that.objectPropertyCardinality != null) { equal = equal && this.objectPropertyCardinality.equals(that.objectPropertyCardinality); } equal = equal && (this.isOverridable() == that.isOverridable()); return equal; } ZObjectProperty(IRI objectProperty); @Override Object clone(); @Override int hashCode(); @Override boolean equals(Object other); IRI getObjectProperty(); String getLabel(); void setLabel(String label); String getComments(); void setComments(String comments); String getObjectPropertyShortFormCS(); String getObjectPropertyShortForm(); String getObjectPropertyNamespace(); void setObjectProperty(IRI objectProperty); String getObjectPropertyType(); String getInstancesClass(); void setObjectPropertyType(String objectPropertyType); String getObjectPropertyCardinality(); Set<ZInstance> getRangeListZInstances(); void setRangeListZInstances(Set<ZInstance> rangeListZInstances); void setObjectPropertyCardinality(String objectPropertyCardinality); void add_RangeZClass(ZPair<ZClass, boolean[]> zClass); Set<ZPair<ZClass, boolean[]>> getRangeListZClasses(); void setRangeListZClasses(Set<ZPair<ZClass, boolean[]>> rangeListZClasses); void add_RangeZInstance(ZInstance zInstance); void addAll_RangeZInstance(Set<ZInstance> zInstance); void addAll_RangeZClass(Collection<? extends ZPair<ZClass, boolean[]>> zclasses); void print(); void setOverridable(); boolean isOverridable(); boolean isGeneratable(); void setGenerate(boolean generate); Set<IRI> getInverseZObjectProperties(); void setInverseZObjectProperties(Set<IRI> inverseZObjectProperties); boolean addInverseZObjectProperty(IRI inverseZObjectProperty); void addAllInverseZObjectProperties(Set<IRI> inverseZObjectProperties); boolean isHidingParentProperty(); void setHidingParentProperty();  }
@Test public void testEquals() throws NoSuchFieldException, IllegalAccessException { String iriStr = "http: IRI iri = IRI.create(iriStr); ZObjectProperty zojectProperty1 = new ZObjectProperty(iri); ZObjectProperty zojectProperty2 = new ZObjectProperty(iri); zojectProperty1.setObjectPropertyCardinality("1"); zojectProperty1.setObjectPropertyType("String"); zojectProperty2.setObjectPropertyCardinality("2"); zojectProperty2.setObjectPropertyType("String"); boolean test = zojectProperty1.equals(zojectProperty2); assertFalse(test); }