void verifyNextId(Map<String, Long> tables, String dbName, HiveConf conf) throws Throwable {
    // Verify the next write id
    for(Map.Entry<String, Long> entry : tables.entrySet()) {
      String[] nextWriteId =
              TestTxnDbUtil.queryToString(conf,
                      "select nwi_next from NEXT_WRITE_ID where  nwi_database = '"
                              + dbName.toLowerCase() + "' and nwi_table = '"
                              + entry.getKey() + "'").split("\n");
      Assert.assertEquals(Long.parseLong(nextWriteId[1].trim()), entry.getValue() + 1);
    }
  }
TestReplicationScenariosAcidTablesBase - base class for replication for ACID tables tests
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/BaseReplicationScenariosAcidTables.java