TEST_P(ProtocolIntegrationTest, MultipleCookiesAndSetCookies) {
  initialize();

  codec_client_ = makeHttpConnection(lookupPort("http"));

  Http::TestRequestHeaderMapImpl request_headers{{":method", "GET"},  {":path", "/dynamo/url"},
                                                 {":scheme", "http"}, {":authority", "host"},
                                                 {"cookie", "a=b"},   {"cookie", "c=d"}};
  Http::TestResponseHeaderMapImpl response_headers{
      {":status", "200"}, {"set-cookie", "foo"}, {"set-cookie", "bar"}};

  auto response = sendRequestAndWaitForResponse(request_headers, 0, response_headers, 0);
  if (downstreamProtocol() == Http::CodecClient::Type::HTTP3) {
    EXPECT_EQ(upstream_request_->headers().get(Http::Headers::get().Cookie)[0]->value(),
              "a=b; c=d");
  }

  ASSERT_TRUE(response->complete());
  EXPECT_EQ("200", response->headers().getStatusValue());

  const auto out = response->headers().get(Http::LowerCaseString("set-cookie"));
  ASSERT_EQ(out.size(), 2);
  ASSERT_EQ(out[0]->value().getStringView(), "foo");
  ASSERT_EQ(out[1]->value().getStringView(), "bar");
}
TEST_P(ProtocolIntegrationTest, MultipleCookiesAndSetCookies) {
  initialize();

  codec_client_ = makeHttpConnection(lookupPort("http"));

  Http::TestRequestHeaderMapImpl request_headers{{":method", "GET"},  {":path", "/dynamo/url"},
                                                 {":scheme", "http"}, {":authority", "host"},
                                                 {"cookie", "a=b"},   {"cookie", "c=d"}};
  Http::TestResponseHeaderMapImpl response_headers{
      {":status", "200"}, {"set-cookie", "foo"}, {"set-cookie", "bar"}};

  auto response = sendRequestAndWaitForResponse(request_headers, 0, response_headers, 0);
  if (downstreamProtocol() == Http::CodecClient::Type::HTTP3) {
    EXPECT_EQ(upstream_request_->headers().get(Http::Headers::get().Cookie)[0]->value(),
              "a=b; c=d");
  }

  ASSERT_TRUE(response->complete());
  EXPECT_EQ("200", response->headers().getStatusValue());

  const auto out = response->headers().get(Http::LowerCaseString("set-cookie"));
  ASSERT_EQ(out.size(), 2);
  ASSERT_EQ(out[0]->value().getStringView(), "foo");
  ASSERT_EQ(out[1]->value().getStringView(), "bar");
}