@Test
  public void checkIcebergTableLocation() throws TException, InterruptedException, IOException {
    Assume.assumeTrue("This test is only for hive catalog", testTableType == TestTables.TestTableType.HIVE_CATALOG);

    String dBName = "testdb";
    String tableName = "tbl";
    String dbWithSuffix = "/" + dBName + ".db";
    String dbManagedLocation = shell.getHiveConf().get(HiveConf.ConfVars.METASTORE_WAREHOUSE.varname) + dbWithSuffix;
    String dbExternalLocation = shell.getHiveConf().get(HiveConf.ConfVars.HIVE_METASTORE_WAREHOUSE_EXTERNAL.varname) +
        dbWithSuffix;
    Path noExistedTblPath = new Path(dbManagedLocation + "/" + tableName);
    Path expectedTblPath = new Path(dbExternalLocation + "/" + tableName);

    // Create a database with default external location and managed location.
    shell.executeStatement("CREATE DATABASE " + dBName);

    // Create a iceberg table without external keyword, and its location should on database external location.
    shell.executeStatement("CREATE TABLE " + dBName + "." + tableName + " (id int) STORED BY ICEBERG");

    // table location whose parent path is managed database location should not exist.
    Assert.assertFalse(noExistedTblPath.getFileSystem(shell.getHiveConf()).exists(noExistedTblPath));

    // Check the iceberg table location, whose parent path should be database external location.
    org.apache.hadoop.hive.metastore.api.Table hmsTable = shell.metastore().getTable(dBName, tableName);
    org.apache.iceberg.Table iceTable = testTables.loadTable(TableIdentifier.of(dBName, tableName));
    Path hmsTblLocation = new Path(hmsTable.getSd().getLocation());
    Assert.assertTrue(hmsTblLocation.getFileSystem(shell.getHiveConf()).exists(hmsTblLocation));
    Assert.assertTrue(expectedTblPath.toString().equalsIgnoreCase(hmsTblLocation.toString()));
    Assert.assertTrue(expectedTblPath.toString().equalsIgnoreCase(iceTable.location()));

    shell.executeStatement("DROP TABLE " + dBName + "." + tableName);
    // external table location should still exist if table is dropped as external.table.purge is default false.
    Assert.assertTrue(hmsTblLocation.getFileSystem(shell.getHiveConf()).exists(hmsTblLocation));
  }
Checks that the new schema has newintcol and newstring col columns on both HMS and Iceberg sides
@throws Exception - any test error
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java