@ParameterizedTest
    @ArgumentsSource(MemoryRecordsArgumentsProvider.class)
    public void testWithRecords(Args args) {
        Compression compression = args.compression;
        byte magic = args.magic;
        MemoryRecords memoryRecords = MemoryRecords.withRecords(magic, compression,
                new SimpleRecord(10L, "key1".getBytes(), "value1".getBytes()));
        String key = Utils.utf8(memoryRecords.batches().iterator().next().iterator().next().key());
        assertEquals("key1", key);
    }
This test is used to see if the base timestamp of the batch has been successfully
converted to a delete horizon for the tombstones / transaction markers of the batch.
It also verifies that the record timestamps remain correct as a delta relative to the delete horizon.
clients/src/test/java/org/apache/kafka/common/record/MemoryRecordsTest.java