setEnvForPermissionOnGroupTests(false);
Assert.assertFalse(evaluator.hasPermission(authentication, targetId, targetType, permission));
}
private void setEnvForPermissionOnGroupTests(boolean isGranted) {
ObjectIdentity groupIdentity = new ObjectIdentityImpl("GROUP", targetId);
Mockito.when(aclUtil.createIdentity(targetId, "GROUP")).thenReturn(groupIdentity);
List<AccessControlEntry> aces = new ArrayList<>();
aces.add(createAccessControlEntry(generalPermission, isGranted, groupSid));
Mockito.when(acl.getEntries()).thenReturn(aces);