### Question:
AuthenticationModuleEventAuditor extends AbstractAuthenticationEventAuditor { public void auditModuleSuccess(LoginState loginState, Principal principal, AuthenticationAuditEntry auditEntryDetail) { String realm = getRealmFromState(loginState); if (eventPublisher.isAuditing(realm, AUTHENTICATION_TOPIC, AM_LOGIN_MODULE_COMPLETED)) { String principalName = principal == null ? null : principal.getName(); String authId = getUserId(principalName, realm); auditModuleEvent(loginState, realm, principalName, authId, SUCCESSFUL, auditEntryDetail); } } @Inject  AuthenticationModuleEventAuditor(AuditEventPublisher eventPublisher, AuditEventFactory eventFactory); void auditModuleSuccess(LoginState loginState, Principal principal,
            AuthenticationAuditEntry auditEntryDetail); void auditModuleFailure(LoginState loginState, Principal principal,
            AuthenticationAuditEntry auditEntryDetail);  }### Answer:
@Test public void shouldNotFailAuditModuleSuccess() { auditor.auditModuleSuccess(null, null, null); auditor.auditModuleSuccess(emptyState, emptyPrincipal, emptyAuditEntryDetail); verify(eventPublisher, times(2)).tryPublish(anyString(), any(AuditEvent.class)); }