public static Snapshot latestSnapshot(Table table, String branch) {
        // For the main branch, currentSnapshot() is used to validate that the API behavior has
        // not changed since that was the API used for validation prior to addition of branches.
        if (branch.equals(SnapshotRef.MAIN_BRANCH)) {
            return table.currentSnapshot();
        }

        return table.snapshot(branch);
    }
Assert table contains the expected list of records after waiting up to {@code maxCheckCount}
with {@code checkInterval}
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/iceberg/src/test/java/org/apache/inlong/sort/iceberg/sink/util/SimpleDataUtil.java