### Question:
Asset extends Referenceable { @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; } Asset asset = (Asset) objectToCompare; return Objects.equals(getDisplayName(), asset.getDisplayName()) && Objects.equals(getShortDescription(), asset.getShortDescription()) && Objects.equals(getDescription(), asset.getDescription()) && Objects.equals(getOwner(), asset.getOwner()) && getOwnerType() == asset.getOwnerType() && Objects.equals(getZoneMembership(), asset.getZoneMembership()) && Objects.equals(getOrigin(), asset.getOrigin()) && Objects.equals(getLatestChange(), asset.getLatestChange()); } Asset();  Asset(Asset template); String getDisplayName(); void setDisplayName(String displayName); String getShortDescription(); void setShortDescription(String shortDescription); String getDescription(); void setDescription(String description); String getOwner(); void setOwner(String owner); OwnerType getOwnerType(); void setOwnerType(OwnerType ownerType); List<String> getZoneMembership(); void setZoneMembership(List<String> zoneMembership); Map<String, String> getOrigin(); void setOrigin(Map<String, String> origin); String getLatestChange(); void setLatestChange(String latestChange); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }### Answer:
@Test public void testAssetProperties() { Map<String, Object> propertyMap; Asset testObject = new Asset(); assertTrue(testObject.getExtendedProperties() == null); propertyMap = null; testObject = new Asset(); testObject.setExtendedProperties(propertyMap); assertTrue(testObject.getExtendedProperties() == null); propertyMap = new HashMap<>(); testObject = new Asset(); testObject.setExtendedProperties(propertyMap); assertTrue(testObject.getExtendedProperties() == null); propertyMap.put("propertyName", "propertyValue"); testObject = new Asset(); testObject.setExtendedProperties(propertyMap); Map<String, Object> retrievedPropertyMap = testObject.getExtendedProperties(); assertTrue(retrievedPropertyMap != null); assertFalse(retrievedPropertyMap.isEmpty()); assertTrue("propertyValue".equals(retrievedPropertyMap.get("propertyName"))); }
@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); Asset sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); Asset differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }