code: public boolean isEnabledSaslMechanism(String saslMechanism) {
          // If enabledSaslMechanisms is not set, then all mechanisms which are not blacklisted are enabled per default.
          if (enabledSaslMechanisms == null) {
              return !SASLAuthentication.getBlacklistedSASLMechanisms().contains(saslMechanism);
          }
          return enabledSaslMechanisms.contains(saslMechanism);
      }
docs: Check if the given SASL mechansism is enabled in this connection configuration.
  
  @param saslMechanism
  @return true if the given SASL mechanism is enabled, false otherwise.