@Override
        public boolean equals(Object o) {
            if (!(o instanceof LocalRecordBatch)) return false;
            LocalRecordBatch other = (LocalRecordBatch) o;

            return leaderEpoch == other.leaderEpoch &&
                appendTimestamp == other.appendTimestamp &&
                Objects.equals(records, other.records);
        }
The LocalLogManager is a test implementation that relies on the contents of memory.
metadata/src/test/java/org/apache/kafka/metalog/LocalLogManager.java