BGContext c1 = bgcm.createAndPersistBGContext("c1name", "c1desc", BusinessGroup.TYPE_LEARNINGROUP, null, true);
BGContext c2 = bgcm.createAndPersistBGContext("c2name", "c2desc", BusinessGroup.TYPE_LEARNINGROUP, id1, false);
DBFactory.getInstance().closeSession(); // simulate user clicks
assertTrue(bgcm.getGroupsOfBGContext(c1).size() == 0);
assertTrue(bgcm.countGroupsOfBGContext(c1) == 0);
DBFactory.getInstance().closeSession(); // simulate user clicks
BusinessGroup g1 = bgm.createAndPersistBusinessGroup(BusinessGroup.TYPE_LEARNINGROUP, null, "g1", null, new Integer(0),
new Integer(10), false, false, c1);
assertNotNull(g1);