privilege.setReadOnly(true);
privilege.setType("TEST");
authzManager.addPrivilege(privilege);
CPrivilege secPriv = this.getConfigurationManager().readPrivilege(privilege.getId());
Assert.assertEquals(privilege.getId(), secPriv.getId());
Assert.assertEquals(privilege.getName(), secPriv.getName());
Assert.assertEquals(privilege.getDescription(), secPriv.getDescription());
Assert.assertEquals(privilege.getType(), secPriv.getType());
Assert.assertEquals(privilege.getProperties().size(), secPriv.getProperties().size());
Map<String, String> props = this.getPropertyMap(secPriv);
Assert.assertEquals("bar2", props.get("foo1"));
Assert.assertEquals("foo2", props.get("bar1"));