@ParameterizedTest(name = "CatalogTableOperationTest[withPrimaryKey={0}]")
    @ValueSource(booleans = {true, false})
    public void tableOperationTests(boolean withPrimary) {
      TableBuilder builder =
          catalog.newTableBuilder(tableIdentifier, schema).withPartitionSpec(spec);
      if (withPrimary) {
        builder.withPrimaryKeySpec(keySpec);
      }
      // create mixed-iceberg
      builder.create();
      // assert table runtime exits
      assertTableRuntime(tableIdentifier, TableFormat.MIXED_ICEBERG);

      // assert 1 table in mixed-iceberg catalog
      Assertions.assertEquals(1, catalog.listTables(database).size());
      Assertions.assertTrue(catalog.tableExists(tableIdentifier));

      // assert 1 tables in iceberg catalog
      Assertions.assertEquals(1, nsCatalog.listTables(Namespace.of(database)).size());
      Set<String> tables =
          nsCatalog.listTables(Namespace.of(database)).stream()
              .map(org.apache.iceberg.catalog.TableIdentifier::name)
              .collect(Collectors.toSet());
      Set<String> expects = Sets.newHashSet(table);
      Assertions.assertEquals(expects, tables);

      // assert load table
      MixedTable mixedIcebergTable = catalog.loadTable(tableIdentifier);
      Assertions.assertEquals(withPrimary, mixedIcebergTable.isKeyedTable());

      AmoroTable<?> serverTable = serverCatalog.loadTable(database, table);
      Assertions.assertEquals(TableFormat.MIXED_ICEBERG, serverTable.format());
      MixedTable serverMixedIceberg = (MixedTable) serverTable.originalTable();
      Assertions.assertEquals(withPrimary, serverMixedIceberg.isKeyedTable());
      if (withPrimary) {
        Assertions.assertEquals(
            keySpec.description(),
            serverMixedIceberg.asKeyedTable().primaryKeySpec().description());
      }

      // drop table
      catalog.dropTable(tableIdentifier, true);
      Assertions.assertEquals(0, catalog.listTables(database).size());
      Assertions.assertEquals(0, nsCatalog.listTables(Namespace.of(database)).size());
    }
write test records to the target table and return the expected records
amoro-ams/src/test/java/org/apache/amoro/server/TestInternalMixedCatalogService.java