code: public void setCustomFields(Map<String, String> fields) {
          clearCustomFields();
          for (String key : fields.keySet()) {
              CustomField f = new CustomField();
              f.setName(key);
              f.setValue(fields.get(key));
              customFields.add(f);
          }
      }
docs: Overwrites the current map of custom fields to the provided map. This is
  a map of String field names to String field values.
  
  @param fields Map