class JettyHttpResponse<T> implements HttpResponse<T> {

  private final HttpRequest request;
  private final Response response;
  private final T body;

  public JettyHttpResponse(HttpRequest request, Response response, T body) {
    this.request = request;
    this.response = response;
    this.body = body;
  }

  @Override
  public List<String> headers(String key) {
    return response.getHeaders().getValuesList(key);
  }

  @Override
  public Map<String, List<String>> headers() {<FILL_FUNCTION_BODY>}

  @Override
  public int code() {
    return response.getStatus();
  }

  @Override
  public T body() {
    return body;
  }

  @Override
  public HttpRequest request() {
    return request;
  }

  public Response getResponse() {
    return response;
  }

  @Override
  public Optional<HttpResponse<?>> previousResponse() {
    return Optional.empty();
  }

}

    return response.getHeaders().stream().reduce(new HashMap<>(), (m, e) -> {
      m.compute(e.getName(), (k, v) -> {
        if (v == null) {
          v = new ArrayList<>();
        }
        v.add(e.getValue());
        return v;
      });
      return m;
    }, (m1, m2) -> m1);
  
<no_super_class>