@Override
    public String toString() {
        return String.format(
            "MockLog(epochStartOffsets=%s, batches=%s, snapshots=%s, highWatermark=%s",
            epochStartOffsets,
            batches,
            snapshots,
            highWatermark
        );
    }
Reopening the log causes all unflushed data to be lost.
raft/src/test/java/org/apache/kafka/raft/MockLog.java