void handleLeaderChange(long offset, LeaderAndEpoch leader) {
            // Simulate KRaft implementation by first bumping the epoch before assigning a leader
            listener.handleLeaderChange(new LeaderAndEpoch(OptionalInt.empty(), leader.epoch()));
            listener.handleLeaderChange(leader);

            notifiedLeader = leader;
            this.offset = offset;
        }
Return all records in the log as a list.
metadata/src/test/java/org/apache/kafka/metalog/LocalLogManager.java