@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); AssetExternalReference sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); assertFalse(getTestObject().equals(getDifferentObject())); assertFalse(getTestObject().equals(getAnotherDifferentObject())); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetExternalReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetExternalReference that = (AssetExternalReference) objectToCompare; return Objects.equals(getExternalReferenceBean(), that.getExternalReferenceBean()); }
AssetExternalReference extends AssetReferenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetExternalReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetExternalReference that = (AssetExternalReference) objectToCompare; return Objects.equals(getExternalReferenceBean(), that.getExternalReferenceBean()); } }
AssetExternalReference extends AssetReferenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetExternalReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetExternalReference that = (AssetExternalReference) objectToCompare; return Objects.equals(getExternalReferenceBean(), that.getExternalReferenceBean()); } AssetExternalReference(ExternalReference    externalReferenceBean);  AssetExternalReference(AssetDescriptor      parentAsset,
                                  ExternalReference    externalReferenceBean);  AssetExternalReference(AssetDescriptor parentAsset, AssetExternalReference templateExternalReference); }
AssetExternalReference extends AssetReferenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetExternalReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetExternalReference that = (AssetExternalReference) objectToCompare; return Objects.equals(getExternalReferenceBean(), that.getExternalReferenceBean()); } AssetExternalReference(ExternalReference    externalReferenceBean);  AssetExternalReference(AssetDescriptor      parentAsset,
                                  ExternalReference    externalReferenceBean);  AssetExternalReference(AssetDescriptor parentAsset, AssetExternalReference templateExternalReference); String getReferenceId(); String getLinkDescription(); String getDisplayName(); String getURI(); String getResourceDescription(); String getVersion(); String getOrganization(); @Override String toString(); @Override boolean equals(Object objectToCompare); }
AssetExternalReference extends AssetReferenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetExternalReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetExternalReference that = (AssetExternalReference) objectToCompare; return Objects.equals(getExternalReferenceBean(), that.getExternalReferenceBean()); } AssetExternalReference(ExternalReference    externalReferenceBean);  AssetExternalReference(AssetDescriptor      parentAsset,
                                  ExternalReference    externalReferenceBean);  AssetExternalReference(AssetDescriptor parentAsset, AssetExternalReference templateExternalReference); String getReferenceId(); String getLinkDescription(); String getDisplayName(); String getURI(); String getResourceDescription(); String getVersion(); String getOrganization(); @Override String toString(); @Override boolean equals(Object objectToCompare);  }