@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); Referenceable sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); Referenceable differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } Referenceable that = (Referenceable) objectToCompare; return Objects.equals(getQualifiedName(), that.getQualifiedName()) && Objects.equals(getAdditionalProperties(), that.getAdditionalProperties()) && Objects.equals(getMeanings(), that.getMeanings()); }
Referenceable extends ElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } Referenceable that = (Referenceable) objectToCompare; return Objects.equals(getQualifiedName(), that.getQualifiedName()) && Objects.equals(getAdditionalProperties(), that.getAdditionalProperties()) && Objects.equals(getMeanings(), that.getMeanings()); } }
Referenceable extends ElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } Referenceable that = (Referenceable) objectToCompare; return Objects.equals(getQualifiedName(), that.getQualifiedName()) && Objects.equals(getAdditionalProperties(), that.getAdditionalProperties()) && Objects.equals(getMeanings(), that.getMeanings()); } Referenceable();  Referenceable(Referenceable template); }
Referenceable extends ElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } Referenceable that = (Referenceable) objectToCompare; return Objects.equals(getQualifiedName(), that.getQualifiedName()) && Objects.equals(getAdditionalProperties(), that.getAdditionalProperties()) && Objects.equals(getMeanings(), that.getMeanings()); } Referenceable();  Referenceable(Referenceable template); void setQualifiedName(String qualifiedName); String getQualifiedName(); void setAdditionalProperties(Map<String, String> additionalProperties); Map<String, String> getAdditionalProperties(); List<Meaning> getMeanings(); void setMeanings(List<Meaning> meanings); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
Referenceable extends ElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } if (!super.equals(objectToCompare)) { return false; } Referenceable that = (Referenceable) objectToCompare; return Objects.equals(getQualifiedName(), that.getQualifiedName()) && Objects.equals(getAdditionalProperties(), that.getAdditionalProperties()) && Objects.equals(getMeanings(), that.getMeanings()); } Referenceable();  Referenceable(Referenceable template); void setQualifiedName(String qualifiedName); String getQualifiedName(); void setAdditionalProperties(Map<String, String> additionalProperties); Map<String, String> getAdditionalProperties(); List<Meaning> getMeanings(); void setMeanings(List<Meaning> meanings); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }