  ResponseHeaderMap* sendResponseHeaders(ResponseHeaderMapPtr&& response_headers) {
    ResponseHeaderMap* altered_response_headers = nullptr;

    EXPECT_CALL(*encoder_filters_[0], encodeHeaders(_, _))
        .WillOnce(Invoke([&](ResponseHeaderMap& headers, bool) -> FilterHeadersStatus {
          altered_response_headers = &headers;
          return FilterHeadersStatus::Continue;
        }));
    EXPECT_CALL(*encoder_filters_[1], encodeHeaders(_, false))
        .WillOnce(Return(FilterHeadersStatus::Continue));
    EXPECT_CALL(response_encoder_, encodeHeaders(_, false));
    decoder_filters_[0]->callbacks_->encodeHeaders(std::move(response_headers), false);
    return altered_response_headers;
  }
  ResponseHeaderMap* sendResponseHeaders(ResponseHeaderMapPtr&& response_headers) {
    ResponseHeaderMap* altered_response_headers = nullptr;

    EXPECT_CALL(*encoder_filters_[0], encodeHeaders(_, _))
        .WillOnce(Invoke([&](ResponseHeaderMap& headers, bool) -> FilterHeadersStatus {
          altered_response_headers = &headers;
          return FilterHeadersStatus::Continue;
        }));
    EXPECT_CALL(*encoder_filters_[1], encodeHeaders(_, false))
        .WillOnce(Return(FilterHeadersStatus::Continue));
    EXPECT_CALL(response_encoder_, encodeHeaders(_, false));
    decoder_filters_[0]->callbacks_->encodeHeaders(std::move(response_headers), false);
    return altered_response_headers;
  }