public void testAuthzURIWithAuthEnabledAndMockCommandAuthorizer(boolean masked)
      throws HiveException, TException, InterruptedException {
    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 target = TableIdentifier.of("default", "target");
    Table table = testTables.createTable(shell, target.name(), HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
        PartitionSpec.unpartitioned(), FileFormat.PARQUET, ImmutableList.of());
    HiveAuthorizer authorizer = CustomTestHiveAuthorizerFactory.getAuthorizer();
    ArgumentCaptor<List<HivePrivilegeObject>> outputHObjsCaptor = ArgumentCaptor.forClass(List.class);
    Mockito.verify(authorizer).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();
    if (hivePrivObject.isPresent()) {
      org.apache.hadoop.hive.metastore.api.Table hmsTable = shell.metastore().getTable(target);
      HiveIcebergStorageHandler storageHandler = new HiveIcebergStorageHandler();
      storageHandler.setConf(shell.getHiveConf());
      String metadataLocation = HiveConf.EncoderDecoderFactory.URL_ENCODER_DECODER.decode(
          storageHandler.getPathForAuth(((BaseTable) table).operations().current().metadataFileLocation(),
              hmsTable.getSd().getLocation()));

      if (masked) {
        Assert.assertTrue(metadataLocation.startsWith(HiveIcebergStorageHandler.TABLE_DEFAULT_LOCATION));
      }
      Assert.assertEquals("iceberg://" + target.namespace() + "/" + target.name() + "?snapshot=" +
              new Path(metadataLocation).getParent().toUri()
                  .getPath() +
              "/dummy.metadata.json",
          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