static void addProviderIfNotExists(SaslClientAuthenticationProvider provider,
    HashMap<Byte, SaslClientAuthenticationProvider> providers) {
    Byte code = provider.getSaslAuthMethod().getCode();
    SaslClientAuthenticationProvider existingProvider = providers.get(code);
    if (existingProvider != null) {
      throw new RuntimeException("Already registered authentication provider with " + code + " "
        + existingProvider.getClass());
    }
    providers.put(code, provider);
  }
Adds the given {@code provider} to the set, only if an equivalent provider does not already
exist in the set.
hbase-client/src/main/java/org/apache/hadoop/hbase/security/provider/SaslClientAuthenticationProviders.java