assertEquals("FetchGroup should contain all members.\n",
expectedSet, members);
}
public void testRemoveMembers() {
FetchGroup fg = pm.getFetchGroup(Employee.class, "testRemoveMembers");
fg.addMembers(allMembers);
fg.removeMembers(relationshipMembers);
Set members = fg.getMembers();
Set expectedSet = new HashSet();
expectedSet.addAll(Arrays.asList(basicMembers));
expectedSet.add("phoneNumbers");
assertEquals("FetchGroup should contain basic members " +
"plus address plus phoneNumbers.\n",
expectedSet, members);
fg.removeMembers(basicMembers);
members = fg.getMembers();
expectedSet = new HashSet();
expectedSet.add("phoneNumbers");
assertEquals("FetchGroup should contain address plus phoneNumbers.\n",
expectedSet, members);
}