@Test
  public void testSortedInsert() throws IOException {
    TableIdentifier identifier = TableIdentifier.of("default", "sort_table");

    Schema schema = new Schema(
        optional(1, "id", Types.IntegerType.get(), "unique ID"),
        optional(2, "data", Types.StringType.get())
    );
    SortOrder order = SortOrder.builderFor(schema)
        .asc("id", NULLS_FIRST)
        .desc("data", NULLS_LAST)
        .build();

    testTables.createTable(shell, identifier.name(), schema, order, PartitionSpec.unpartitioned(), fileFormat,
        ImmutableList.of(), formatVersion, ImmutableMap.of());
    shell.executeStatement(String.format("INSERT INTO TABLE %s VALUES (4, 'a'), (1, 'a'), (3, 'a'), (2, 'a'), " +
            "(null, 'a'), (3, 'b'), (3, null)", identifier.name()));

    List<Record> expected = TestHelper.RecordsBuilder.newInstance(schema)
        .add(null, "a").add(1, "a").add(2, "a").add(3, "b").add(3, "a").add(3, null).add(4, "a")
        .build();
    List<Object[]> result = shell.executeStatement(String.format("SELECT * FROM %s", identifier.name()));
    HiveIcebergTestUtils.validateData(expected, HiveIcebergTestUtils.valueForRow(schema, result));
  }
Runs insert queries against Iceberg tables. These should cover the various insertion methods of Hive including:
inserting values, inserting from select subqueries, insert overwrite table, etc...
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergInserts.java