@Test
public void testNotEquals() {
PrivilegeDefinition otherDef = Mockito.mock(PrivilegeDefinition.class);
when(otherDef.getName()).thenReturn(def.getName());
when(otherDef.isAbstract()).thenReturn(def.isAbstract());
when(otherDef.getDeclaredAggregateNames()).thenReturn(def.getDeclaredAggregateNames());
assertNotEquals(def, otherDef);
assertNotEquals(def, null);
assertNotEquals(def, new ImmutablePrivilegeDefinition("othername", true, ImmutableList.of("aggrName")));
assertNotEquals(def, new ImmutablePrivilegeDefinition("name", false, ImmutableList.of("aggrName")));
assertNotEquals(def, new ImmutablePrivilegeDefinition("name", true, ImmutableList.of("anotherName")));
assertNotEquals(def, new ImmutablePrivilegeDefinition("name", true, ImmutableList.of()));
assertNotEquals(def, new ImmutablePrivilegeDefinition("otherName", false, ImmutableList.of("aggrName","aggrName2")));
}
}