private static void requireNonNullMode(ConnectionMode connectionMode, SecurityProtocol securityProtocol) {
        if (connectionMode == null)
            throw new IllegalArgumentException("`mode` must be non-null if `securityProtocol` is `" + securityProtocol + "`");
    }
@return a mutable RecordingMap. The elements got from RecordingMap are marked as "used".
clients/src/main/java/org/apache/kafka/common/network/ChannelBuilders.java