code: public static List<MediaType> parseMediaTypes(String mediaTypes) {
          if (!Strings.isNullOrEmpty(mediaTypes)) {
              return Collections.emptyList();
          }
          String[] tokens = mediaTypes.split(",\\s*");
          List<MediaType> result = new ArrayList<MediaType>(tokens.length);
          for (String token : tokens) {
              result.add(parseMediaType(token));
          }
          return result;
      }
docs: Parse the given, comma-separated string into a list of {@code MediaType} objects.
  <p>This method can be used to parse an Accept or Content-Type header.
  
  @param mediaTypes the string to parse
  @return the list of media types
  @throws IllegalArgumentException if the string cannot be parsed