securityManager.addRole("newuser1", "role3");
securityManager.addRole("newuser1", "role4");
securityManager.removeRole("newuser1", "role2");
securityManager.removeRole("newuser1", "role4");
HashSet<Role> roles = new HashSet<Role>();
roles.add(new Role("role1", true, true, true, true, true, true, true));
Assert.assertTrue(securityManager.validateUserAndRole("newuser1", "newpassword1", roles, CheckType.SEND));
roles = new HashSet<Role>();
roles.add(new Role("role2", true, true, true, true, true, true, true));
Assert.assertFalse(securityManager.validateUserAndRole("newuser1", "newpassword1", roles, CheckType.SEND));
roles = new HashSet<Role>();
roles.add(new Role("role3", true, true, true, true, true, true, true));
Assert.assertTrue(securityManager.validateUserAndRole("newuser1", "newpassword1", roles, CheckType.SEND));
roles = new HashSet<Role>();
roles.add(new Role("role4", true, true, true, true, true, true, true));
Assert.assertFalse(securityManager.validateUserAndRole("newuser1", "newpassword1", roles, CheckType.SEND));
roles = new HashSet<Role>();
roles.add(new Role("role5", true, true, true, true, true, true, true));
Assert.assertFalse(securityManager.validateUserAndRole("newuser1", "newpassword1", roles, CheckType.SEND));
}