response.isValid());
assertFalse(
"New user mustn't belong to the group he belonged to prior deletion",
response.getGroups().contains(
new Principal(group.sAMAccountName.toLowerCase())));
// add new user as member to the group
ad.initialize();
group.children.add(user);
ad.setMembers(false, group);
s.getTraversalManager().resumeTraversal(null);
// delete the group, create the same one with different GUID
ad.deleteEntity(group);
ad.createGroup(false, group, ou);
s.getTraversalManager().resumeTraversal(null);
response = s.getAuthenticationManager().authenticate(
new SimpleAuthenticationIdentity(
user.sAMAccountName, TestConfiguration.password));
assertTrue("User from resurrected group can be authenticated",
response.isValid());
assertFalse("User must not belong to resurrected group",
response.getGroups().contains(new Principal(
group.sAMAccountName.toLowerCase())));
}
}