MemoryRecords endTxnRecords(
        ControlRecordType controlRecordType,
        long producerId,
        short producerEpoch,
        long offset
    ) {
        return endTxnRecords(controlRecordType, producerId, producerEpoch, offset, 0, 0, RecordBatch.NO_TIMESTAMP);
    }
This test was intended to check file size and positions after closing and reopening a segment.
Since there is no log file in ElasticLogSegment, we only test the segment size when reopening.
The method name is kept the same for compatibility.
core/src/test/java/kafka/log/streamaspect/ElasticLogSegmentTest.java