@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); CommunityOutboundEvent sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); CommunityOutboundEvent anotherObject = getTestObject(); anotherObject.setEventVersionId(3773L); assertFalse(getTestObject().equals(anotherObject)); }
@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; } CommunityOutboundEvent that = (CommunityOutboundEvent) objectToCompare; return Objects.equals(getCommunity(), that.getCommunity()); }
CommunityOutboundEvent extends CommunityProfileOutboundEvent { @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; } CommunityOutboundEvent that = (CommunityOutboundEvent) objectToCompare; return Objects.equals(getCommunity(), that.getCommunity()); } }
CommunityOutboundEvent extends CommunityProfileOutboundEvent { @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; } CommunityOutboundEvent that = (CommunityOutboundEvent) objectToCompare; return Objects.equals(getCommunity(), that.getCommunity()); } CommunityOutboundEvent();  CommunityOutboundEvent(CommunityOutboundEvent template); }
CommunityOutboundEvent extends CommunityProfileOutboundEvent { @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; } CommunityOutboundEvent that = (CommunityOutboundEvent) objectToCompare; return Objects.equals(getCommunity(), that.getCommunity()); } CommunityOutboundEvent();  CommunityOutboundEvent(CommunityOutboundEvent template); Community getCommunity(); void setCommunity(Community community); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
CommunityOutboundEvent extends CommunityProfileOutboundEvent { @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; } CommunityOutboundEvent that = (CommunityOutboundEvent) objectToCompare; return Objects.equals(getCommunity(), that.getCommunity()); } CommunityOutboundEvent();  CommunityOutboundEvent(CommunityOutboundEvent template); Community getCommunity(); void setCommunity(Community community); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }