TEST_F(ConnectionManagerUtilityTest, ViaAppend) {
  via_ = "foo";
  connection_.stream_info_.downstream_address_provider_->setRemoteAddress(
      std::make_shared<Network::Address::Ipv4Instance>("10.0.0.1"));
  ON_CALL(config_, useRemoteAddress()).WillByDefault(Return(true));

  TestRequestHeaderMapImpl request_headers;
  EXPECT_EQ((MutateRequestRet{"10.0.0.1:0", true, Tracing::Reason::NotTraceable}),
            callMutateRequestHeaders(request_headers, Protocol::Http2));
  EXPECT_EQ("foo", request_headers.get_(Headers::get().Via));

  TestResponseHeaderMapImpl response_headers;
  // Pretend we're doing a 100-continue transform here.
  ConnectionManagerUtility::mutateResponseHeaders(response_headers, &request_headers, config_, "");
  // The actual response header processing.
  ConnectionManagerUtility::mutateResponseHeaders(response_headers, &request_headers, config_,
                                                  via_);
  EXPECT_EQ("foo", response_headers.get_(Headers::get().Via));
}
TEST_F(ConnectionManagerUtilityTest, ViaAppend) {
  via_ = "foo";
  connection_.stream_info_.downstream_address_provider_->setRemoteAddress(
      std::make_shared<Network::Address::Ipv4Instance>("10.0.0.1"));
  ON_CALL(config_, useRemoteAddress()).WillByDefault(Return(true));

  TestRequestHeaderMapImpl request_headers;
  EXPECT_EQ((MutateRequestRet{"10.0.0.1:0", true, Tracing::Reason::NotTraceable}),
            callMutateRequestHeaders(request_headers, Protocol::Http2));
  EXPECT_EQ("foo", request_headers.get_(Headers::get().Via));

  TestResponseHeaderMapImpl response_headers;
   
  ConnectionManagerUtility::mutateResponseHeaders(response_headers, &request_headers, config_, "");
   
  ConnectionManagerUtility::mutateResponseHeaders(response_headers, &request_headers, config_,
                                                  via_);
  EXPECT_EQ("foo", response_headers.get_(Headers::get().Via));
}