code: public ContentTypeEngine getContentTypeEngine(String contentTypeOrSuffix) {
          if (StringUtils.isNullOrEmpty(contentTypeOrSuffix)) {
              return null;
          }
  
          String sanitizedTypes = sanitizeContentTypes(contentTypeOrSuffix);
          String[] types = sanitizedTypes.split(",");
          for (String type : types) {
              ContentTypeEngine engine = engines.get(type);
              if (engine != null) {
                  return engine;
              }
          }
  
          return suffixes.get(contentTypeOrSuffix.toLowerCase());
      }
docs: Returns the first matching content type engine for a content type suffix (json, xml, yaml), a
  simple content type (application/json) or a complex accept header like:
  <p/>
  <pre>
  text/html,application/xhtml+xml,application/xml;q=0.9,image/webp
  </pre>
  
  @param contentTypeOrSuffix
  @return null or the first matching content type engine