validateRule(writeACLConfig("ACL ALLOW user1 ALL BROKER"), "user1", Operation.ALL, ObjectType.BROKER, ObjectProperties.EMPTY);
}
private void validateRule(final PlainConfiguration config, String username, Operation operation, ObjectType objectType, ObjectProperties objectProperties)
{
final RuleSet rs = config.getConfiguration();
assertEquals(1, rs.getRuleCount());
final Map<Integer, Rule> rules = rs.getAllRules();
assertEquals(1, rules.size());
final Rule rule = rules.get(0);
assertEquals("Rule has unexpected identity", username, rule.getIdentity());
assertEquals("Rule has unexpected operation", operation, rule.getAction().getOperation());
assertEquals("Rule has unexpected operation", objectType, rule.getAction().getObjectType());