@Test public void equals() { assertNotEquals(sp1, sp2); assertNotEquals(sp1.hashCode(), sp2.hashCode()); ScopeNotificationFilterPreference sp1Bis = new ScopeNotificationFilterPreference(p1, referenceResolver); assertEquals(sp1, sp1Bis); assertEquals(sp1.hashCode(), sp1Bis.hashCode()); sp1Bis.setEnabled(true); verify(p1).setEnabled(true); assertEquals(sp1, sp1Bis); assertEquals(sp1.hashCode(), sp1Bis.hashCode()); sp1Bis.setHasParent(true); assertNotEquals(sp1, sp1Bis); assertNotEquals(sp1.hashCode(), sp1Bis.hashCode()); sp1.setHasParent(true); sp1Bis.addChild(sp2); assertNotEquals(sp1, sp1Bis); assertNotEquals(sp1.hashCode(), sp1Bis.hashCode()); sp1.addChild(sp2); assertEquals(sp1, sp1Bis); assertEquals(sp1.hashCode(), sp1Bis.hashCode()); assertNotEquals(sp2, sp3); assertNotEquals(sp1, sp3); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ScopeNotificationFilterPreference that = (ScopeNotificationFilterPreference) o; return new EqualsBuilder() .append(hasParent, that.hasParent) .append(filterPreference, that.filterPreference) .append(scopeReference, that.scopeReference) .append(children, that.children) .isEquals(); }
ScopeNotificationFilterPreference implements NotificationFilterPreference { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ScopeNotificationFilterPreference that = (ScopeNotificationFilterPreference) o; return new EqualsBuilder() .append(hasParent, that.hasParent) .append(filterPreference, that.filterPreference) .append(scopeReference, that.scopeReference) .append(children, that.children) .isEquals(); } }
ScopeNotificationFilterPreference implements NotificationFilterPreference { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ScopeNotificationFilterPreference that = (ScopeNotificationFilterPreference) o; return new EqualsBuilder() .append(hasParent, that.hasParent) .append(filterPreference, that.filterPreference) .append(scopeReference, that.scopeReference) .append(children, that.children) .isEquals(); } ScopeNotificationFilterPreference(NotificationFilterPreference filterPreference,
            EntityReferenceResolver<String> entityReferenceResolver); }
ScopeNotificationFilterPreference implements NotificationFilterPreference { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ScopeNotificationFilterPreference that = (ScopeNotificationFilterPreference) o; return new EqualsBuilder() .append(hasParent, that.hasParent) .append(filterPreference, that.filterPreference) .append(scopeReference, that.scopeReference) .append(children, that.children) .isEquals(); } ScopeNotificationFilterPreference(NotificationFilterPreference filterPreference,
            EntityReferenceResolver<String> entityReferenceResolver); void setHasParent(boolean hasParent); boolean hasParent(); List<ScopeNotificationFilterPreference> getChildren(); void addChild(ScopeNotificationFilterPreference child); boolean isParentOf(ScopeNotificationFilterPreference other); EntityReference getScopeReference(); @Override String getId(); @Override String getFilterName(); @Override String getProviderHint(); @Override boolean isEnabled(); @Override boolean isActive(); @Override NotificationFilterType getFilterType(); @Override Set<NotificationFormat> getNotificationFormats(); @Override Date getStartingDate(); @Override Set<String> getEventTypes(); @Override String getUser(); @Override String getPageOnly(); @Override String getPage(); @Override String getWiki(); @Override void setEnabled(boolean enabled); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
ScopeNotificationFilterPreference implements NotificationFilterPreference { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ScopeNotificationFilterPreference that = (ScopeNotificationFilterPreference) o; return new EqualsBuilder() .append(hasParent, that.hasParent) .append(filterPreference, that.filterPreference) .append(scopeReference, that.scopeReference) .append(children, that.children) .isEquals(); } ScopeNotificationFilterPreference(NotificationFilterPreference filterPreference,
            EntityReferenceResolver<String> entityReferenceResolver); void setHasParent(boolean hasParent); boolean hasParent(); List<ScopeNotificationFilterPreference> getChildren(); void addChild(ScopeNotificationFilterPreference child); boolean isParentOf(ScopeNotificationFilterPreference other); EntityReference getScopeReference(); @Override String getId(); @Override String getFilterName(); @Override String getProviderHint(); @Override boolean isEnabled(); @Override boolean isActive(); @Override NotificationFilterType getFilterType(); @Override Set<NotificationFormat> getNotificationFormats(); @Override Date getStartingDate(); @Override Set<String> getEventTypes(); @Override String getUser(); @Override String getPageOnly(); @Override String getPage(); @Override String getWiki(); @Override void setEnabled(boolean enabled); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }