fetch.removeFetchGroup("baz");
fetch.removeFetchGroup("c");
checkGroups(pm, new String[]{ "foo", "a", "b", "d" });
fetch.clearFetchGroups().addFetchGroup(FetchPlan.GROUP_DEFAULT);
checkGroups(pm, new String[0]);
}
private void checkGroups(OpenJPAEntityManager pm, String[] groups) {
HashSet groupSet = new HashSet(Arrays.asList(groups));