assertNotNull(groupInstance);
assertEquals(groupInstance.getGroupDN(), groupDN);
// Use a member list to iterate across the member DNs with no filter.
MemberList memberList = groupInstance.getMembers();
while (memberList.hasMoreMembers())
{
try
{
assertNotNull(memberList.nextMemberDN());
} catch (MembershipException me) {}
}
assertNull(memberList.nextMemberDN());
memberList.close();
// Perform a filtered iteration across the member DNs.
SearchFilter filter =
SearchFilter.createFilterFromString("(objectClass=*)");
memberList = groupInstance.getMembers(DN.decode("o=test"),
SearchScope.WHOLE_SUBTREE, filter);
while (memberList.hasMoreMembers())
{
try
{
assertNotNull(memberList.nextMemberDN());
} catch (MembershipException me) {}
}
assertNull(memberList.nextMemberDN());
memberList.close();
// Use a member list to iterate across the member entries with no filter.
memberList = groupInstance.getMembers();
while (memberList.hasMoreMembers())
{
try
{
assertNotNull(memberList.nextMemberEntry());
} catch (MembershipException me) {}
}
assertNull(memberList.nextMemberEntry());
memberList.close();
// Perform a filtered iteration across the member entries.
filter = SearchFilter.createFilterFromString("(objectClass=*)");
memberList = groupInstance.getMembers(DN.decode("o=test"),
SearchScope.WHOLE_SUBTREE, filter);
while (memberList.hasMoreMembers())
{
try
{
assertNotNull(memberList.nextMemberEntry());
} catch (MembershipException me) {}
}
assertNull(memberList.nextMemberEntry());
memberList.close();
// Delete the group and make sure the group manager gets updated
// accordingly.
InternalClientConnection conn =