@Test
public void testAuditLogRoleMember() {

    StringBuilder auditDetails = new StringBuilder(ZMSConsts.STRING_BLDR_SIZE_DEFAULT);
    RoleMember rm = new RoleMember().setMemberName("user.joe");
    zms.dbService.auditLogRoleMember(auditDetails, rm, true);
    assertEquals(auditDetails.toString(), "{\"member\": \"user.joe\", \"approved\": true, \"system-disabled\": 0}");
    auditDetails.setLength(0);
    RoleMember rm2 = new RoleMember().setMemberName("user.joe").setApproved(true).setSystemDisabled(0);
    zms.dbService.auditLogRoleMember(auditDetails, rm2, true);
    assertEquals(auditDetails.toString(), "{\"member\": \"user.joe\", \"approved\": true, \"system-disabled\": 0}");
    auditDetails.setLength(0);
    RoleMember rm3 = new RoleMember().setMemberName("user.joe").setApproved(false).setSystemDisabled(1);
    zms.dbService.auditLogRoleMember(auditDetails, rm3, true);
    assertEquals(auditDetails.toString(), "{\"member\": \"user.joe\", \"approved\": false, \"system-disabled\": 1}");
    auditDetails.setLength(0);
    RoleMember rm4 = new RoleMember().setMemberName("user.joe")
            .setApproved(false).setExpiration(Timestamp.fromMillis(1000)).setSystemDisabled(3);
    zms.dbService.auditLogRoleMember(auditDetails, rm4, true);
    assertEquals(auditDetails.toString(), "{\"member\": \"user.joe\", \"expiration\": \"1970-01-01T00:00:01.000Z\", \"approved\": false, \"system-disabled\": 3}");
}