### Question:
AssetRelatedMediaReference extends AssetExternalReference { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetRelatedMediaReference)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetRelatedMediaReference that = (AssetRelatedMediaReference) objectToCompare; return Objects.equals(getRelatedMediaReferenceBean(), that.getRelatedMediaReferenceBean()); } AssetRelatedMediaReference(RelatedMediaReference  relatedMediaReferenceBean);  AssetRelatedMediaReference(AssetDescriptor        parentAsset,
                                      RelatedMediaReference  relatedMediaReferenceBean);  AssetRelatedMediaReference(AssetDescriptor            parentAsset,
                                      AssetRelatedMediaReference templateRelatedMediaReference); RelatedMediaType getMediaType(); List<RelatedMediaUsage> getMediaUsageList(); @Override String toString(); @Override boolean equals(Object objectToCompare);  }### Answer:
@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); AssetRelatedMediaReference sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); assertFalse(getTestObject().equals(getDifferentObject())); assertFalse(getTestObject().equals(getAnotherDifferentObject())); }