String msg = null;
String is = null, startsWith = null, endsWith = null, contains = null, badQuery = null;
Class type = IPERSON_CLASS;
IEntityGroup existingGroup = null;
IGroupMember member = null;
EntityIdentifier[] ids = null;
msg = "Searching for existing groups...";
print(msg);
for ( int i=0; i<testFileNames.length; i++ )
{
is = testFileNames[i];
startsWith = is.substring(0, (is.length() - 1) );
endsWith = is.substring(1);
contains = is.substring(1, (is.length() - 1));
badQuery = is + " a b c";
msg = "Searching for IS " + is;
ids = getGroupStore().searchForGroups(is, IGroupConstants.IS, type);
assertEquals(msg, ids.length, 1);
member = findGroup(ids[0].getKey());
assertTrue(msg, member.isGroup());
msg = "Searching for STARTS WITH " + startsWith;
ids = getGroupStore().searchForGroups(startsWith, IGroupConstants.STARTS_WITH, type);
assertTrue(msg, ids.length > 0);