MemoryRecords endTxnRecords(ControlRecordType controlRecordType,
        long producerId,
        short producerEpoch,
        long offset,
        int partitionLeaderEpoch,
        int coordinatorEpoch,
        long timestamp) {
        EndTransactionMarker marker = new EndTransactionMarker(controlRecordType, coordinatorEpoch);
        return MemoryRecords.withEndTransactionMarker(offset, timestamp, partitionLeaderEpoch, producerId, producerEpoch, marker);
    }
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