### Question:
SyslogAuditEventHandlerFactory implements AuditEventHandlerFactory { @Override public AuditEventHandler create(AuditEventHandlerConfiguration configuration) throws AuditException { Map<String, Set<String>> attributes = configuration.getAttributes(); SyslogAuditEventHandlerConfiguration syslogHandlerConfiguration = new SyslogAuditEventHandlerConfiguration(); syslogHandlerConfiguration.setEnabled(getBooleanMapAttr(attributes, "enabled", true)); syslogHandlerConfiguration.setName(configuration.getHandlerName()); syslogHandlerConfiguration.setTopics(attributes.get("topics")); syslogHandlerConfiguration.setHost(getMapAttr(attributes, "host")); setPort(syslogHandlerConfiguration, attributes); String transportProtocol = getMapAttr(attributes, "transportProtocol"); try { syslogHandlerConfiguration.setProtocol(TransportProtocol.valueOf(transportProtocol)); } catch (IllegalArgumentException iae) { throw new AuditException("Attribute 'transportProtocol' is invalid: " + transportProtocol); } setConnectTimeout(syslogHandlerConfiguration, attributes); EventBufferingConfiguration eventBufferingConfiguration = new EventBufferingConfiguration(); eventBufferingConfiguration.setEnabled(getBooleanMapAttr(attributes, "bufferingEnabled", true)); syslogHandlerConfiguration.setBufferingConfiguration(eventBufferingConfiguration); String facility = getMapAttr(attributes, "facility"); try { syslogHandlerConfiguration.setFacility(Facility.valueOf(facility)); } catch (IllegalArgumentException iae) { throw new AuditException("Attribute 'facility' is invalid: " + facility); } return new SyslogAuditEventHandler(syslogHandlerConfiguration, configuration.getEventTopicsMetaData(), new ProductInfoProviderImpl(), new SyslogLocalHostNameProvider()); }  @Override AuditEventHandler create(AuditEventHandlerConfiguration configuration);  }### Answer:
@Test private void shouldCreateSyslogEventHandler() throws AuditException { AuditEventHandlerConfiguration configuration = AuditEventHandlerConfiguration.builder() .withName("Syslog Handler") .withAttributes(configAttributes) .withEventTopicsMetaData(eventTopicsMetaData).build(); AuditEventHandler handler = factory.create(configuration); assertThat(handler).isInstanceOf(SyslogAuditEventHandler.class); assertThat(handler.getName()).isEqualTo("Syslog Handler"); assertThat(handler.getHandledTopics()).containsExactly("access"); assertThat(handler.isEnabled()).isTrue(); }