### Question:
AuthenticationProcessEventAuditor extends AbstractAuthenticationEventAuditor { public void auditLoginSuccess(LoginState loginState) { String realm = getRealmFromState(loginState); if (eventPublisher.isAuditing(realm, AUTHENTICATION_TOPIC, AM_LOGIN_COMPLETED)) { String moduleName = null; String userDN = null; if (loginState != null) { moduleName = loginState.getAuthModuleNames(); userDN = loginState.getUserDN(); } AMAuthenticationAuditEventBuilder builder = eventFactory.authenticationEvent(realm) .transactionId(getTransactionIdValue()) .component(AUTHENTICATION) .eventName(AM_LOGIN_COMPLETED) .result(SUCCESSFUL) .entry(getAuditEntryDetail(moduleName, loginState)) .trackingIds(getTrackingIds(loginState)) .userId(userDN == null ? "" : userDN) .principal(DNUtils.DNtoName(userDN)); eventPublisher.tryPublish(AUTHENTICATION_TOPIC, builder.toEvent()); } } @Inject  AuthenticationProcessEventAuditor(AuditEventPublisher eventPublisher, AuditEventFactory eventFactory); void auditLoginSuccess(LoginState loginState); void auditLoginFailure(LoginState loginState); void auditLoginFailure(LoginState loginState, AuthenticationFailureReason failureReason); void auditLogout(SSOToken token);  }### Answer:
@Test public void shouldNotFailAuditLoginSuccess() { auditor.auditLoginSuccess(null); auditor.auditLoginSuccess(emptyState); verify(eventPublisher, times(2)).tryPublish(anyString(), any(AuditEvent.class)); }