code: public void setMetadata(String key, Object value) {
          if (value != null) {
              getMetadata().put(key, value);
          }
      }
docs: Sets a metadata value.
  
  @param key The key.
  @param value The value.