@Test
  public void testMigrationFailsForManagedTable() {
    // enough to test once
    Assume.assumeTrue(fileFormat == FileFormat.ORC && isVectorized &&
        testTableType == TestTables.TestTableType.HIVE_CATALOG);
    String tableName = "tbl_unsupported";
    shell.executeStatement("CREATE MANAGED TABLE " +  tableName + " (a int) STORED AS " + fileFormat + " " +
        testTables.locationForCreateTableSQL(TableIdentifier.of("default", tableName)) +
        testTables.propertiesForCreateTableSQL(ImmutableMap.of()));
    shell.executeStatement("INSERT INTO " + tableName + " VALUES (1), (2), (3)");
    AssertHelpers.assertThrows("Migrating a managed table to Iceberg should have thrown an exception.",
        IllegalArgumentException.class, "Converting non-external, temporary or transactional hive table to iceberg",
        () -> shell.executeStatement("ALTER TABLE " + tableName + " convert to iceberg"));
  }
Tests table migration from native Hive tables to Iceberg backed tables (with the same underlying fileformat).
Migration on the original tables is done by setting HiveIcebergStorageHandler on them, contents later should be
verified by a select query.
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergMigration.java