private static int messageSize(ApiMessageAndVersion messageAndVersion, ObjectSerializationCache objectCache) {
        return new MetadataRecordSerde().recordSize(messageAndVersion, objectCache);
    }
The current leader, as seen by this log manager.
metadata/src/test/java/org/apache/kafka/metalog/LocalLogManager.java