@Override
        public boolean equals(Object o) {
            if (!(o instanceof LeaderChangeBatch)) return false;
            LeaderChangeBatch other = (LeaderChangeBatch) o;
            return other.newLeader.equals(newLeader);
        }
The LocalLogManager is a test implementation that relies on the contents of memory.
metadata/src/test/java/org/apache/kafka/metalog/LocalLogManager.java