@Test
public void testListRoleAuditLogs() throws SQLException {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    Mockito.when(mockResultSet.next())
        .thenReturn(true)   // domain id success
        .thenReturn(true)   // role id success
        .thenReturn(true)   // 2 log entries
        .thenReturn(true)
        .thenReturn(false);
    Mockito.when(mockResultSet.getInt(1))
        .thenReturn(5)  // domain id
        .thenReturn(7); // role id
    Mockito.when(mockResultSet.getString(ZMSConsts.DB_COLUMN_ACTION))
        .thenReturn("ADD")
        .thenReturn("DELETE");
    Mockito.when(mockResultSet.getString(ZMSConsts.DB_COLUMN_MEMBER))
        .thenReturn("user.member1")
        .thenReturn("user.member2");
    Mockito.when(mockResultSet.getString(ZMSConsts.DB_COLUMN_ADMIN))
        .thenReturn("user.admin1")
        .thenReturn("user.admin2");
    Mockito.when(mockResultSet.getString(ZMSConsts.DB_COLUMN_AUDIT_REF))
        .thenReturn("")
        .thenReturn("audit-ref");
    Mockito.doReturn(new java.sql.Timestamp(1454358916))
        .when(mockResultSet).getTimestamp(ZMSConsts.DB_COLUMN_CREATED);
    List<RoleAuditLog> logs = jdbcConn.listRoleAuditLogs("my-domain", "role1");
    assertNotNull(logs);
    assertEquals(2, logs.size());
    assertEquals("ADD", logs.get(0).getAction());
    assertEquals("user.admin1", logs.get(0).getAdmin());
    assertEquals("user.member1", logs.get(0).getMember());
    assertNull(logs.get(0).getAuditRef());
    assertEquals("DELETE", logs.get(1).getAction());
    assertEquals("user.admin2", logs.get(1).getAdmin());
    assertEquals("user.member2", logs.get(1).getMember());
    assertEquals("audit-ref", logs.get(1).getAuditRef());
    jdbcConn.close();
}