public void testAuditConfiguration() throws Exception
{
SecurityContext sc = SecurityContextFactory.createSecurityContext("test");
AuditManager am = sc.getAuditManager();
AuditEvent ae = new AuditEvent(AuditLevel.ERROR);
am.audit(ae);
//Now check that the Audit Event has been placed on the thread local
//by our TestAuditProvider
AuditEvent aev = (AuditEvent) AuditTestAssociation.auditEventLocal.get();
assertEquals("Audit events are the same", ae, aev);