@Override
                                protected BatchRetentionResult checkBatchRetention(RecordBatch batch) {
                                    // retain all batches
                                    return new BatchRetentionResult(BatchRetention.RETAIN_EMPTY, false);
                                }
This test verifies that the checksum returned for various versions matches hardcoded values to catch unintentional
changes to how the checksum is computed.
clients/src/test/java/org/apache/kafka/common/record/MemoryRecordsTest.java