ImmutablePrivilegeDefinition implements PrivilegeDefinition { @Override public String toString() { return "PrivilegeDefinition: " + name; } 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 testToString() { assertEquals(def.toString(), def.toString()); assertEquals(def.toString(), new ImmutablePrivilegeDefinition(def.getName(), def.isAbstract(), def.getDeclaredAggregateNames()).toString()); assertNotEquals(def.toString(), new ImmutablePrivilegeDefinition(def.getName(), def.isAbstract(), ImmutableList.of())); }