use of org.forgerock.openam.audit.configuration.AuditEventHandlerConfiguration in project OpenAM by OpenRock.
the class AuditServiceProviderImplTest method shouldNotRegisterHandlersWhenFactoryReturnsNull.
@Test
public void shouldNotRegisterHandlersWhenFactoryReturnsNull() throws Exception {
// Given
for (AuditEventHandlerConfiguration config : handlerConfigs) {
config.getAttributes().put("enabled", singleton("false"));
}
// When
configListener.globalConfigurationChanged();
// Then
assertThat(provider.getDefaultAuditService().getRegisteredHandler("Mock Handler")).isNull();
assertThat(provider.getDefaultAuditService().getRegisteredHandler("No such handler")).isNull();
}
Aggregations