assertTrue(rm.hasBGRight(CourseRights.RIGHT_ARCHIVING, id2, c2));
assertFalse(rm.hasBGRight(CourseRights.RIGHT_ARCHIVING, id3, c2));
DBFactory.getInstance().closeSession(); // simulate user clicks
BGAreaManager am = BGAreaManagerImpl.getInstance();
BGArea a1 = am.createAndPersistBGAreaIfNotExists("a1-delete", "desca1", c1);
BGArea a2 = am.createAndPersistBGAreaIfNotExists("a2-delete", null, c1);
BGArea a3 = am.createAndPersistBGAreaIfNotExists("a3-delete", "desca3", c1);
BGArea a4 = am.createAndPersistBGAreaIfNotExists("a4-delete", "desca4", c1);
am.addBGToBGArea(g1, a1);
am.addBGToBGArea(g2, a1);
am.addBGToBGArea(g1, a2);
am.addBGToBGArea(g2, a3);
am.addBGToBGArea(g1, a4);