@Test
  public void testAlterTableWithMetadataLocationFromAnotherTable() throws IOException {
    TableIdentifier sourceIdentifier = TableIdentifier.of("default", "source");
    Table sourceTable =
        testTables.createTable(shell, sourceIdentifier.name(), HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
            PartitionSpec.unpartitioned(), FileFormat.PARQUET, Collections.emptyList(), 1,
            ImmutableMap.<String, String>builder().put(InputFormatConfig.EXTERNAL_TABLE_PURGE, "FALSE").build());
    testTables.appendIcebergTable(shell.getHiveConf(), sourceTable, FileFormat.PARQUET, null,
        HiveIcebergStorageHandlerTestUtils.CUSTOMER_RECORDS);
    String metadataLocation = ((BaseTable) sourceTable).operations().current().metadataFileLocation();
    shell.executeStatement("DROP TABLE " + sourceIdentifier.name());
    TableIdentifier targetIdentifier = TableIdentifier.of("default", "target");
    testTables.createTable(shell, targetIdentifier.name(), HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
        PartitionSpec.unpartitioned(), FileFormat.PARQUET, Collections.emptyList(), 1, Collections.emptyMap());
    Assertions.assertThatThrownBy(() -> {
      shell.executeStatement("ALTER TABLE " + targetIdentifier.name() + " SET TBLPROPERTIES('metadata_location'='" +
              metadataLocation + "')");
    })
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessageContaining("Cannot change iceberg table");
  }
Checks that HiveIcebergMetaHook doesn't run into failures with undefined alter operation type (e.g. stat updates)
@throws Exception - any test failure
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java