@Test void equals() { DefaultEvent event1 = new DefaultEvent(); DefaultEvent event2 = new DefaultEvent(); assertEquals(event1, event1); assertEquals(event1, event2); assertNotEquals(event1, null); assertNotEquals(null, event1); assertNotEquals(event1, new Object()); assertNotEquals(new Object(), event1); event1.setId("id1"); assertNotEquals(event1, event2); event2.setId("id2"); assertNotEquals(event1, event2); event2.setId("id1"); assertEquals(event1, event2); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Event) { Event otherEvent = (Event) obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getApplication(), otherEvent.getApplication()); builder.append(getBody(), otherEvent.getBody()); builder.append(getDate(), otherEvent.getDate()); builder.append(getDocument(), otherEvent.getDocument()); builder.append(getDocumentTitle(), otherEvent.getDocumentTitle()); builder.append(getDocumentVersion(), otherEvent.getDocumentVersion()); builder.append(getGroupId(), otherEvent.getGroupId()); builder.append(getHidden(), otherEvent.getHidden()); builder.append(getId(), otherEvent.getId()); builder.append(getImportance(), otherEvent.getImportance()); builder.append(getParameters(), otherEvent.getParameters()); builder.append(getRelatedEntity(), otherEvent.getRelatedEntity()); builder.append(getSpace(), otherEvent.getSpace()); builder.append(getStream(), otherEvent.getStream()); builder.append(getTarget(), otherEvent.getTarget()); builder.append(getTitle(), otherEvent.getTitle()); builder.append(getType(), otherEvent.getType()); builder.append(getUrl(), otherEvent.getUrl()); builder.append(getUser(), otherEvent.getUser()); builder.append(getWiki(), otherEvent.getWiki()); builder.append(isPrefiltered(), otherEvent.isPrefiltered()); return builder.build(); } return false; }
DefaultEvent implements Event { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Event) { Event otherEvent = (Event) obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getApplication(), otherEvent.getApplication()); builder.append(getBody(), otherEvent.getBody()); builder.append(getDate(), otherEvent.getDate()); builder.append(getDocument(), otherEvent.getDocument()); builder.append(getDocumentTitle(), otherEvent.getDocumentTitle()); builder.append(getDocumentVersion(), otherEvent.getDocumentVersion()); builder.append(getGroupId(), otherEvent.getGroupId()); builder.append(getHidden(), otherEvent.getHidden()); builder.append(getId(), otherEvent.getId()); builder.append(getImportance(), otherEvent.getImportance()); builder.append(getParameters(), otherEvent.getParameters()); builder.append(getRelatedEntity(), otherEvent.getRelatedEntity()); builder.append(getSpace(), otherEvent.getSpace()); builder.append(getStream(), otherEvent.getStream()); builder.append(getTarget(), otherEvent.getTarget()); builder.append(getTitle(), otherEvent.getTitle()); builder.append(getType(), otherEvent.getType()); builder.append(getUrl(), otherEvent.getUrl()); builder.append(getUser(), otherEvent.getUser()); builder.append(getWiki(), otherEvent.getWiki()); builder.append(isPrefiltered(), otherEvent.isPrefiltered()); return builder.build(); } return false; } }
DefaultEvent implements Event { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Event) { Event otherEvent = (Event) obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getApplication(), otherEvent.getApplication()); builder.append(getBody(), otherEvent.getBody()); builder.append(getDate(), otherEvent.getDate()); builder.append(getDocument(), otherEvent.getDocument()); builder.append(getDocumentTitle(), otherEvent.getDocumentTitle()); builder.append(getDocumentVersion(), otherEvent.getDocumentVersion()); builder.append(getGroupId(), otherEvent.getGroupId()); builder.append(getHidden(), otherEvent.getHidden()); builder.append(getId(), otherEvent.getId()); builder.append(getImportance(), otherEvent.getImportance()); builder.append(getParameters(), otherEvent.getParameters()); builder.append(getRelatedEntity(), otherEvent.getRelatedEntity()); builder.append(getSpace(), otherEvent.getSpace()); builder.append(getStream(), otherEvent.getStream()); builder.append(getTarget(), otherEvent.getTarget()); builder.append(getTitle(), otherEvent.getTitle()); builder.append(getType(), otherEvent.getType()); builder.append(getUrl(), otherEvent.getUrl()); builder.append(getUser(), otherEvent.getUser()); builder.append(getWiki(), otherEvent.getWiki()); builder.append(isPrefiltered(), otherEvent.isPrefiltered()); return builder.build(); } return false; }  }
DefaultEvent implements Event { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Event) { Event otherEvent = (Event) obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getApplication(), otherEvent.getApplication()); builder.append(getBody(), otherEvent.getBody()); builder.append(getDate(), otherEvent.getDate()); builder.append(getDocument(), otherEvent.getDocument()); builder.append(getDocumentTitle(), otherEvent.getDocumentTitle()); builder.append(getDocumentVersion(), otherEvent.getDocumentVersion()); builder.append(getGroupId(), otherEvent.getGroupId()); builder.append(getHidden(), otherEvent.getHidden()); builder.append(getId(), otherEvent.getId()); builder.append(getImportance(), otherEvent.getImportance()); builder.append(getParameters(), otherEvent.getParameters()); builder.append(getRelatedEntity(), otherEvent.getRelatedEntity()); builder.append(getSpace(), otherEvent.getSpace()); builder.append(getStream(), otherEvent.getStream()); builder.append(getTarget(), otherEvent.getTarget()); builder.append(getTitle(), otherEvent.getTitle()); builder.append(getType(), otherEvent.getType()); builder.append(getUrl(), otherEvent.getUrl()); builder.append(getUser(), otherEvent.getUser()); builder.append(getWiki(), otherEvent.getWiki()); builder.append(isPrefiltered(), otherEvent.isPrefiltered()); return builder.build(); } return false; }  @Override String getId(); @Override void setId(String id); @Override String getGroupId(); @Override void setGroupId(String id); @Override String getType(); @Override void setType(String type); @Override Date getDate(); @Override void setDate(Date date); @Override Importance getImportance(); @Override void setImportance(Importance importance); @Override String getApplication(); @Override void setApplication(String application); @Override String getStream(); @Override void setStream(String stream); @Override WikiReference getWiki(); @Override void setWiki(WikiReference wiki); @Override SpaceReference getSpace(); @Override void setSpace(SpaceReference space); @Override DocumentReference getDocument(); @Override void setDocument(DocumentReference document); @Override String getDocumentVersion(); @Override void setDocumentVersion(String version); @Override EntityReference getRelatedEntity(); @Override void setRelatedEntity(EntityReference entity); @Override DocumentReference getUser(); @Override void setUser(DocumentReference user); @Override URL getUrl(); @Override void setUrl(URL url); @Override String getTitle(); @Override void setTitle(String title); @Override String getBody(); @Override void setBody(String body); @Override String getDocumentTitle(); @Override void setDocumentTitle(String title); @Override Map<String, String> getParameters(); @Override void setParameters(Map<String, String> parameters); @Override void setTarget(Set<String> target); @Override Set<String> getTarget(); @Override String toString(); @Override boolean getHidden(); @Override void setHidden(boolean isHidden); @Override boolean isPrefiltered(); @Override void setPrefiltered(boolean prefiltered); @Override boolean equals(Object obj); @Override int hashCode(); }
DefaultEvent implements Event { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Event) { Event otherEvent = (Event) obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getApplication(), otherEvent.getApplication()); builder.append(getBody(), otherEvent.getBody()); builder.append(getDate(), otherEvent.getDate()); builder.append(getDocument(), otherEvent.getDocument()); builder.append(getDocumentTitle(), otherEvent.getDocumentTitle()); builder.append(getDocumentVersion(), otherEvent.getDocumentVersion()); builder.append(getGroupId(), otherEvent.getGroupId()); builder.append(getHidden(), otherEvent.getHidden()); builder.append(getId(), otherEvent.getId()); builder.append(getImportance(), otherEvent.getImportance()); builder.append(getParameters(), otherEvent.getParameters()); builder.append(getRelatedEntity(), otherEvent.getRelatedEntity()); builder.append(getSpace(), otherEvent.getSpace()); builder.append(getStream(), otherEvent.getStream()); builder.append(getTarget(), otherEvent.getTarget()); builder.append(getTitle(), otherEvent.getTitle()); builder.append(getType(), otherEvent.getType()); builder.append(getUrl(), otherEvent.getUrl()); builder.append(getUser(), otherEvent.getUser()); builder.append(getWiki(), otherEvent.getWiki()); builder.append(isPrefiltered(), otherEvent.isPrefiltered()); return builder.build(); } return false; }  @Override String getId(); @Override void setId(String id); @Override String getGroupId(); @Override void setGroupId(String id); @Override String getType(); @Override void setType(String type); @Override Date getDate(); @Override void setDate(Date date); @Override Importance getImportance(); @Override void setImportance(Importance importance); @Override String getApplication(); @Override void setApplication(String application); @Override String getStream(); @Override void setStream(String stream); @Override WikiReference getWiki(); @Override void setWiki(WikiReference wiki); @Override SpaceReference getSpace(); @Override void setSpace(SpaceReference space); @Override DocumentReference getDocument(); @Override void setDocument(DocumentReference document); @Override String getDocumentVersion(); @Override void setDocumentVersion(String version); @Override EntityReference getRelatedEntity(); @Override void setRelatedEntity(EntityReference entity); @Override DocumentReference getUser(); @Override void setUser(DocumentReference user); @Override URL getUrl(); @Override void setUrl(URL url); @Override String getTitle(); @Override void setTitle(String title); @Override String getBody(); @Override void setBody(String body); @Override String getDocumentTitle(); @Override void setDocumentTitle(String title); @Override Map<String, String> getParameters(); @Override void setParameters(Map<String, String> parameters); @Override void setTarget(Set<String> target); @Override Set<String> getTarget(); @Override String toString(); @Override boolean getHidden(); @Override void setHidden(boolean isHidden); @Override boolean isPrefiltered(); @Override void setPrefiltered(boolean prefiltered); @Override boolean equals(Object obj); @Override int hashCode();  }