@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); MockAssetElement 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 AssetElementHeader)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetElementHeader that = (AssetElementHeader) objectToCompare; return Objects.equals(getElementHeaderBean(), that.getElementHeaderBean()); }
AssetElementHeader extends AssetPropertyBase { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetElementHeader)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetElementHeader that = (AssetElementHeader) objectToCompare; return Objects.equals(getElementHeaderBean(), that.getElementHeaderBean()); } }
AssetElementHeader extends AssetPropertyBase { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetElementHeader)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetElementHeader that = (AssetElementHeader) objectToCompare; return Objects.equals(getElementHeaderBean(), that.getElementHeaderBean()); } protected  AssetElementHeader(AssetDescriptor parentAsset); protected  AssetElementHeader(ElementHeader elementHeaderBean); protected  AssetElementHeader(AssetDescriptor parentAsset,
                                 ElementHeader elementHeaderBean); protected  AssetElementHeader(AssetDescriptor parentAsset, AssetElementHeader assetElementHeader); }
AssetElementHeader extends AssetPropertyBase { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetElementHeader)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetElementHeader that = (AssetElementHeader) objectToCompare; return Objects.equals(getElementHeaderBean(), that.getElementHeaderBean()); } protected  AssetElementHeader(AssetDescriptor parentAsset); protected  AssetElementHeader(ElementHeader elementHeaderBean); protected  AssetElementHeader(AssetDescriptor parentAsset,
                                 ElementHeader elementHeaderBean); protected  AssetElementHeader(AssetDescriptor parentAsset, AssetElementHeader assetElementHeader); AssetElementType getType(); String getGUID(); String getURL(); List<AssetClassification> getAssetClassifications(); Map<String, Object> getExtendedProperties(); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
AssetElementHeader extends AssetPropertyBase { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetElementHeader)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetElementHeader that = (AssetElementHeader) objectToCompare; return Objects.equals(getElementHeaderBean(), that.getElementHeaderBean()); } protected  AssetElementHeader(AssetDescriptor parentAsset); protected  AssetElementHeader(ElementHeader elementHeaderBean); protected  AssetElementHeader(AssetDescriptor parentAsset,
                                 ElementHeader elementHeaderBean); protected  AssetElementHeader(AssetDescriptor parentAsset, AssetElementHeader assetElementHeader); AssetElementType getType(); String getGUID(); String getURL(); List<AssetClassification> getAssetClassifications(); Map<String, Object> getExtendedProperties(); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }