public void testGrantPermission()
throws Exception
{
SecurityService ss = TurbineSecurity.getService();
Role admin = ss.getRoleByName("Admin");
assertNotNull(admin);
Permission app = ss.getPermissionByName("Application");
assertNotNull(app);
PermissionSet ps = admin.getPermissions();
assertFalse(ps.contains(app));
ss.grant(admin, app);
Role admin2 = ss.getRoleByName("Admin");
assertNotNull(admin2);
PermissionSet ps2 = admin2.getPermissions();
assertTrue(ps2.contains(app));
// Get existing PermissionSet modified?
assertFalse(ps.contains(app));