class NestedMetadata {

  static ObjectNode headersFromAttributes(Map<String, String> attributes) {
    ObjectNode header = Json.createObjectNode();
    attributes.entrySet().stream().filter(entry -> HEADER_ATTRIBUTES.contains(entry.getKey())) //
        .forEach(entry -> header.put(entry.getKey(), entry.getValue()));
    return header;
  }

  private  NestedMetadata();

}