@Test
public void testGetAudtLogMsgBuilder() {

    List<String> roles = Arrays.asList("role1", "role2");
    Principal principal = SimplePrincipal.create("athenz", "creds", roles, null);
    RsrcCtxWrapper ctx = Mockito.mock(RsrcCtxWrapper.class);
    Mockito.when(ctx.principal()).thenReturn(principal);
    HttpServletRequestWrapper request = Mockito.mock(HttpServletRequestWrapper.class);
    Mockito.when(ctx.request()).thenReturn(request);
    Mockito.when(request.getRemoteAddr()).thenReturn("10.11.12.13");
    AuditLoggerFactory factory = new DefaultAuditLoggerFactory();
    AuditLogger auditLogger = factory.create();
    AuditLogMsgBuilder msgBuilder = ZMSUtils.getAuditLogMsgBuilder(ctx, auditLogger, "athenz",
            "audit-ref", "unit-test", "putRole");
    assertNotNull(msgBuilder);
    assertTrue(msgBuilder.who().contains("who-roles=[role1, role2]"), msgBuilder.who());
}