ImmutablePrivilegeDefinition implements PrivilegeDefinition { @Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof ImmutablePrivilegeDefinition) { ImmutablePrivilegeDefinition other = (ImmutablePrivilegeDefinition) o; return name.equals(other.name) && isAbstract == other.isAbstract && declaredAggregateNames.equals(other.declaredAggregateNames); } else { return false; } } ImmutablePrivilegeDefinition(@NotNull String name, boolean isAbstract, @Nullable Iterable<String> declaredAggregateNames); @NotNull @Override String getName(); @Override boolean isAbstract(); @NotNull @Override Set<String> getDeclaredAggregateNames(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }
@Test public void testEquals() { assertEquals(def, def); assertEquals(def, new ImmutablePrivilegeDefinition(def.getName(), def.isAbstract(), def.getDeclaredAggregateNames())); }