@Test
public void testAuditLogger() {

    auditLogger = buildAuditLogger(catalogReader);
    ThreadContext.put("accountNumber", "12345");
    ThreadContext.put("companyId", "12345");
    ThreadContext.put("userId", "JohnDoe");
    ThreadContext.put("ipAddress", "127.0.0.1");
    ThreadContext.put("environment", "dev");
    ThreadContext.put("product", "TestProduct");
    ThreadContext.put("timeZone", "America/Phoenix");
    ThreadContext.put("loginId", "TestUser");
    Map<String, String> properties = new HashMap<>();
    properties.put("toAccount", "123456");
    properties.put("fromAccount", "111111");
    properties.put("amount", "111.55");
    try {
        auditLogger.logEvent("transfer", properties);
    } catch (Exception ex) {
        ex.printStackTrace();
        fail();
    }
    List<String> msgs = app.getMessages();
    assertNotNull("No messages", msgs);
    assertEquals("No messages", 1, msgs.size());
    String msg = msgs.get(0);
    assertTrue("No companyId", msg.contains("companyId=\"12345\""));
    assertTrue("No ipAddress", msg.contains("ipAddress=\"127.0.0.1\""));
    assertTrue("No toAccount", msg.contains("toAccount=\"123456\""));
}