@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); AssetUniverse 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 AssetUniverse)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetUniverse that = (AssetUniverse) objectToCompare; return Objects.equals(getMeanings(), that.getMeanings()) && Objects.equals(getSchema(), that.getSchema()) && Objects.equals(getFeedback(), that.getFeedback()) && Objects.equals(getKnownLocations(), that.getKnownLocations()) && Objects.equals(getLineage(), that.getLineage()) && Objects.equals(getRelatedAssets(), that.getRelatedAssets()); }
AssetUniverse extends AssetDetail { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetUniverse)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetUniverse that = (AssetUniverse) objectToCompare; return Objects.equals(getMeanings(), that.getMeanings()) && Objects.equals(getSchema(), that.getSchema()) && Objects.equals(getFeedback(), that.getFeedback()) && Objects.equals(getKnownLocations(), that.getKnownLocations()) && Objects.equals(getLineage(), that.getLineage()) && Objects.equals(getRelatedAssets(), that.getRelatedAssets()); } }
AssetUniverse extends AssetDetail { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetUniverse)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetUniverse that = (AssetUniverse) objectToCompare; return Objects.equals(getMeanings(), that.getMeanings()) && Objects.equals(getSchema(), that.getSchema()) && Objects.equals(getFeedback(), that.getFeedback()) && Objects.equals(getKnownLocations(), that.getKnownLocations()) && Objects.equals(getLineage(), that.getLineage()) && Objects.equals(getRelatedAssets(), that.getRelatedAssets()); } protected  AssetUniverse();  AssetUniverse(Asset                       assetBean,
                         AssetExternalIdentifiers    externalIdentifiers,
                         AssetRelatedMediaReferences relatedMediaReferences,
                         AssetNoteLogs               noteLogs,
                         AssetExternalReferences     externalReferences,
                         AssetConnections            connections,
                         AssetLicenses               licenses,
                         AssetCertifications         certifications,
                         List<AssetMeaning>          meanings,
                         AssetSchemaType             schema,
                         AssetFeedback               feedback,
                         AssetLocations              knownLocations,
                         AssetLineage                lineage,
                         AssetRelatedAssets relatedAssets);  AssetUniverse(AssetUniverse template); }
AssetUniverse extends AssetDetail { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetUniverse)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetUniverse that = (AssetUniverse) objectToCompare; return Objects.equals(getMeanings(), that.getMeanings()) && Objects.equals(getSchema(), that.getSchema()) && Objects.equals(getFeedback(), that.getFeedback()) && Objects.equals(getKnownLocations(), that.getKnownLocations()) && Objects.equals(getLineage(), that.getLineage()) && Objects.equals(getRelatedAssets(), that.getRelatedAssets()); } protected  AssetUniverse();  AssetUniverse(Asset                       assetBean,
                         AssetExternalIdentifiers    externalIdentifiers,
                         AssetRelatedMediaReferences relatedMediaReferences,
                         AssetNoteLogs               noteLogs,
                         AssetExternalReferences     externalReferences,
                         AssetConnections            connections,
                         AssetLicenses               licenses,
                         AssetCertifications         certifications,
                         List<AssetMeaning>          meanings,
                         AssetSchemaType             schema,
                         AssetFeedback               feedback,
                         AssetLocations              knownLocations,
                         AssetLineage                lineage,
                         AssetRelatedAssets relatedAssets);  AssetUniverse(AssetUniverse template); List<AssetMeaning> getMeanings(); AssetSchemaType getSchema(); AssetFeedback getFeedback(); AssetLocations getKnownLocations(); AssetLineage getLineage(); AssetRelatedAssets getRelatedAssets(); @Override String toString(); @Override boolean equals(Object objectToCompare); }
AssetUniverse extends AssetDetail { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetUniverse)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetUniverse that = (AssetUniverse) objectToCompare; return Objects.equals(getMeanings(), that.getMeanings()) && Objects.equals(getSchema(), that.getSchema()) && Objects.equals(getFeedback(), that.getFeedback()) && Objects.equals(getKnownLocations(), that.getKnownLocations()) && Objects.equals(getLineage(), that.getLineage()) && Objects.equals(getRelatedAssets(), that.getRelatedAssets()); } protected  AssetUniverse();  AssetUniverse(Asset                       assetBean,
                         AssetExternalIdentifiers    externalIdentifiers,
                         AssetRelatedMediaReferences relatedMediaReferences,
                         AssetNoteLogs               noteLogs,
                         AssetExternalReferences     externalReferences,
                         AssetConnections            connections,
                         AssetLicenses               licenses,
                         AssetCertifications         certifications,
                         List<AssetMeaning>          meanings,
                         AssetSchemaType             schema,
                         AssetFeedback               feedback,
                         AssetLocations              knownLocations,
                         AssetLineage                lineage,
                         AssetRelatedAssets relatedAssets);  AssetUniverse(AssetUniverse template); List<AssetMeaning> getMeanings(); AssetSchemaType getSchema(); AssetFeedback getFeedback(); AssetLocations getKnownLocations(); AssetLineage getLineage(); AssetRelatedAssets getRelatedAssets(); @Override String toString(); @Override boolean equals(Object objectToCompare);  }