### Question:
AssetEvent extends AssetConsumerEvent { @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; } AssetEvent that = (AssetEvent) objectToCompare; return Objects.equals(getAsset(), that.getAsset()); } AssetEvent();  AssetEvent(AssetEvent template); Asset getAsset(); void setAsset(Asset asset); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }### Answer:
@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); AssetEvent sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); AssetEvent differentObject = getTestObject(); differentObject.setAsset(new Asset()); assertFalse(getTestObject().equals(differentObject)); AssetEvent anotherObject = getTestObject(); anotherObject.setEventVersionId(3773L); assertFalse(getTestObject().equals(anotherObject)); }