/** {@inheritDoc} Uses the connection from the provided databaseTester. */
  public void verifyData() throws Exception {
    if (databaseTester == null) {
      throw new IllegalStateException("databaseTester is null; must configure or set it first");
    }

    IDatabaseConnection connection = databaseTester.getConnection();

    try {
      int count = tableDefs.length;
      LOG.info("verifyData: about to verify {} tables={}", new Integer(count), tableDefs);
      if (count == 0) {
        LOG.warn("verifyData: No tables to verify;" + " no VerifyTableDefinitions specified");
      }

      for (int i = 0; i < count; i++) {
        VerifyTableDefinition td = tableDefs[i];
        String[] excludeColumns = td.getColumnExclusionFilters();
        String[] includeColumns = td.getColumnInclusionFilters();
        String tableName = td.getTableName();

        LOG.info("verifyData: Verifying table '{}'", tableName);

        LOG.debug("verifyData: Loading its rows from expected dataset");
        ITable expectedTable = null;
        try {
          expectedTable = expectedDs.getTable(tableName);
        } catch (Exception e) {
          final String msg =
              "verifyData: Problem obtaining table '" + tableName + "' from expected dataset";
          LOG.error(msg, e);
          throw new DataSetException(msg, e);
        }

        LOG.debug("verifyData: Loading its rows from actual table");
        ITable actualTable = null;
        try {
          actualTable = connection.createTable(tableName);
        } catch (Exception e) {
          final String msg =
              "verifyData: Problem obtaining table '" + tableName + "' from actual dataset";
          LOG.error(msg, e);
          throw new DataSetException(msg, e);
        }

        verifyData(expectedTable, actualTable, excludeColumns, includeColumns);
      }
    } finally {
      LOG.debug("verifyData: Verification done, closing connection");
      connection.close();
    }
  }