public void testAuthzURIWithAuthEnabledWithMetadataLocation(boolean masked) throws HiveException {
    shell.getHiveConf().setBoolean(HIVE_ICEBERG_MASK_DEFAULT_LOCATION.varname, masked);
    shell.setHiveSessionValue("hive.security.authorization.enabled", true);
    shell.setHiveSessionValue("hive.security.authorization.manager",
        "org.apache.iceberg.mr.hive.CustomTestHiveAuthorizerFactory");
    TableIdentifier source = TableIdentifier.of("default", "source");
    Table sourceTable = testTables.createTable(shell, source.name(), HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
        PartitionSpec.unpartitioned(), FileFormat.PARQUET, ImmutableList.of());

    String metadataFileLocation =
        URI.create(((BaseTable) sourceTable).operations().current().metadataFileLocation()).getPath();
    TableIdentifier target = TableIdentifier.of("default", "target");

    Table targetTable = testTables.createTable(shell, target.name(), HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
        PartitionSpec.unpartitioned(), FileFormat.PARQUET, ImmutableList.of(), 1,
        Collections.singletonMap(BaseMetastoreTableOperations.METADATA_LOCATION_PROP, metadataFileLocation));
    HiveAuthorizer authorizer = CustomTestHiveAuthorizerFactory.getAuthorizer();
    ArgumentCaptor<List<HivePrivilegeObject>> outputHObjsCaptor = ArgumentCaptor.forClass(List.class);
    Mockito.verify(authorizer,  times(2))
        .checkPrivileges(Mockito.any(), Mockito.any(), outputHObjsCaptor.capture(), Mockito.any());
    Optional<HivePrivilegeObject> hivePrivObject = outputHObjsCaptor.getValue().stream()
        .filter(hpo -> hpo.getType().equals(HivePrivilegeObject.HivePrivilegeObjectType.STORAGEHANDLER_URI)).findAny();

    // For the target table, validate the metadata file location is passed at Authorizer.
    if (hivePrivObject.isPresent()) {
      Assert.assertEquals("iceberg://" + target.namespace() + "/" + target.name() + "?snapshot=" + metadataFileLocation,
          HiveConf.EncoderDecoderFactory.URL_ENCODER_DECODER.decode(hivePrivObject.get().getObjectName()));
    } else {
      Assert.fail("StorageHandler auth URI is not found");
    }
  }
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