protected void setUp() throws Exception
{
super.setUp();
final RuleSet rs = new RuleSet();
rs.addGroup("aclGroup1", Arrays.asList(new String[] {"member1", "member2"}));
// Rule expressed with username
rs.grant(0, "user1", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
// Rule expressed with a acl group
rs.grant(1, "aclGroup1", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
// Rule expressed with an external group
rs.grant(2, "extGroup1", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
// Catch all rule
rs.grant(3, Rule.ALL, Permission.DENY_LOG, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
_plugin = (AccessControl) AccessControl.FACTORY.newInstance(createConfiguration(rs));
SecurityManager.setThreadSubject(null);