@ParameterizedTest(name = "Assert-HistoricalCatalog-CannotLoad-NewTable[withPrimaryKey={0}]")
    @ValueSource(booleans = {false, true})
    public void assertHistoricalCatalogCannotLoadNewTable(boolean primaryKey) {
      TableBuilder builder =
          catalog.newTableBuilder(tableIdentifier, schema).withPartitionSpec(spec);
      if (primaryKey) {
        builder.withPrimaryKeySpec(keySpec);
      }
      builder.create();

      // assert list table show the new tables.
      Assertions.assertEquals(1, historicalCatalog.listTables(database).size());

      // assert load table failed.
      Assertions.assertThrows(
          Exception.class,
          () -> {
            historicalCatalog.loadTable(tableIdentifier);
          });

      // assert drop table failed.
      Assertions.assertThrows(
          Exception.class,
          () -> {
            historicalCatalog.dropTable(tableIdentifier, true);
          });
      // clean up the table.
      catalog.dropTable(tableIdentifier, true);
    }
The purpose of these tests is to test the compatibility of historical versions of connectors.
Mixed-iceberg tables created by old connectors can be accessed with new connectors, but tables
created by new connectors cannot be accessed with old versions.
amoro-ams/src/test/java/org/apache/amoro/server/TestInternalMixedCatalogService.java