code: protected List<Object> canonicalizeAttribute(final String key, final List<Object> value, final Map<String, CaseCanonicalizationMode> config) {
          if (value == null || value.isEmpty() || config == null || !(config.containsKey(key))) {
              return value;
          }
          CaseCanonicalizationMode canonicalizationMode = config.get(key);
          if (canonicalizationMode == null) {
              // Intentionally late binding of the default to
              // avoid unexpected behavior if you wait to assign
              // the default until after you've injected the list
              // of case-insensitive fields
              canonicalizationMode = defaultCaseCanonicalizationMode;
          }
          final List<Object> canonicalizedValues = new ArrayList<>(value.size());
          for (final Object origValue : value) {
              if (origValue instanceof String) {
                  canonicalizedValues.add(canonicalizationMode.canonicalize((String) origValue, caseCanonicalizationLocale));
              } else {
                  canonicalizedValues.add(origValue);
              }
          }
          return canonicalizedValues;
      }
docs: Canonicalize the attribute values if they are present in the config map.
  @param key attribute key
  @param value list of attribute values
  @param config map of attribute names to canonicalization key for the attribute
  @return if configured to do so, returns a canonicalized list of values.