@Test
  public void testMigrationFailsForUnsupportedSourceFileFormat() {
    // enough to test once
    Assume.assumeTrue(fileFormat == FileFormat.ORC && isVectorized &&
        testTableType == TestTables.TestTableType.HIVE_CATALOG);
    String tableName = "tbl_unsupported";
    List<String> formats = ImmutableList.of("TEXTFILE", "JSONFILE", "RCFILE", "SEQUENCEFILE");
    formats.forEach(format -> {
      shell.executeStatement("CREATE EXTERNAL TABLE " +  tableName + " (a int) STORED AS " + format + " " +
          testTables.locationForCreateTableSQL(TableIdentifier.of("default", tableName)) +
          testTables.propertiesForCreateTableSQL(ImmutableMap.of()));
      shell.executeStatement("INSERT INTO " + tableName + " VALUES (1), (2), (3)");
      AssertHelpers.assertThrows("Migrating a " + format + " table to Iceberg should have thrown an exception.",
          IllegalArgumentException.class, "Cannot convert hive table to iceberg with input format: ",
          () -> shell.executeStatement("ALTER TABLE " + tableName + " Convert to iceberg"));
      shell.executeStatement("DROP TABLE " + tableName);
    });
  }
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