use of org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeConfiguration in project jackrabbit-oak by apache.
the class InternalSecurityProviderTest method testSetPrivilegeConfiguration.
@Test
public void testSetPrivilegeConfiguration() {
PrivilegeConfiguration pc = Mockito.mock(PrivilegeConfiguration.class);
when(pc.getParameters()).thenReturn(PARAMS);
securityProvider.setPrivilegeConfiguration(pc);
assertSame(pc, securityProvider.getConfiguration(PrivilegeConfiguration.class));
for (SecurityConfiguration sc : securityProvider.getConfigurations()) {
if (sc instanceof PrivilegeConfiguration) {
assertSame(pc, sc);
}
}
assertEquals(PARAMS, securityProvider.getParameters(PrivilegeConfiguration.NAME));
}
Aggregations