}
@Test
public void testSetGroup()
{
Group group = new Group();
Permission.setPermissionsInGroup(group, EnumSet.noneOf(Permission.class));
assertFalse(group.getSql());
assertFalse(group.getAdmin());
assertFalse(group.getDefaultproc());
assertFalse(group.getDefaultprocread());
group = new Group();
Permission.setPermissionsInGroup(group, EnumSet.of(Permission.SQL));
assertTrue(group.getSql());
assertFalse(group.getAdmin());
assertFalse(group.getDefaultproc());
assertFalse(group.getDefaultprocread());
group = new Group();
Permission.setPermissionsInGroup(group, EnumSet.of(Permission.ADMIN));
assertFalse(group.getSql());
assertTrue(group.getAdmin());
assertFalse(group.getDefaultproc());
assertFalse(group.getDefaultprocread());
group = new Group();
Permission.setPermissionsInGroup(group, EnumSet.of(Permission.SQL, Permission.DEFAULTPROC, Permission.DEFAULTPROCREAD));
assertTrue(group.getSql());
assertFalse(group.getAdmin());
assertTrue(group.getDefaultproc());
assertTrue(group.getDefaultprocread());
group = new Group();
Permission.setPermissionsInGroup(group, EnumSet.of(Permission.SQL, Permission.ADMIN));
assertTrue(group.getSql());
assertTrue(group.getAdmin());
assertFalse(group.getDefaultproc());
assertFalse(group.getDefaultprocread());
}