### Question:
AssetPropertyBase extends AssetPropertyElementBase { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } AssetPropertyBase that = (AssetPropertyBase) objectToCompare; return parentAsset != null ? parentAsset.equals(that.parentAsset) : that.parentAsset == null; } protected  AssetPropertyBase(AssetDescriptor parentAsset); protected  AssetPropertyBase(AssetDescriptor parentAsset, AssetPropertyBase template); @Override boolean equals(Object objectToCompare);  }### Answer:
@Test public void testEquals() { ElementType elementType = new ElementType(); Asset assetBean = new Asset(); elementType.setElementTypeName("TestTypeName"); assetBean.setQualifiedName("TestAssetName"); assetBean.setType(elementType); AssetDescriptor parentAsset = new AssetSummary(assetBean); AssetPropertyBase assetPropertyBase = new MockAssetProperty(parentAsset); MockAssetProperty mockAssetProperty = new MockAssetProperty(parentAsset); assertFalse(assetPropertyBase.equals("String Value")); assertTrue(assetPropertyBase.equals(assetPropertyBase)); assertTrue(assetPropertyBase.equals(mockAssetProperty)); assertTrue(mockAssetProperty.equals(assetPropertyBase)); }