TEST_F(ConnectionManagerUtilityTest, NoPreserveExternalRequestIdNoEdgeRequest) {
  ON_CALL(config_, preserveExternalRequestId()).WillByDefault(Return(false));

  // with no request id
  {
    TestRequestHeaderMapImpl headers;
    EXPECT_CALL(*request_id_extension_, set(testing::Ref(headers), false));
    EXPECT_CALL(*request_id_extension_, set(_, true)).Times(0);
    callMutateRequestHeaders(headers, Protocol::Http2);
    EXPECT_EQ(random_.uuid_, headers.get_(Headers::get().RequestId));
  }

  // with request id
  {
    TestRequestHeaderMapImpl headers{{"x-request-id", "my-request-id"}};
    EXPECT_CALL(*request_id_extension_, set(testing::Ref(headers), false));
    EXPECT_CALL(*request_id_extension_, set(_, true)).Times(0);
    callMutateRequestHeaders(headers, Protocol::Http2);
    EXPECT_EQ("my-request-id", headers.get_(Headers::get().RequestId));
  }
}
TEST_F(ConnectionManagerUtilityTest, NoPreserveExternalRequestIdNoEdgeRequest) {
  ON_CALL(config_, preserveExternalRequestId()).WillByDefault(Return(false));

   
  {
    TestRequestHeaderMapImpl headers;
    EXPECT_CALL(*request_id_extension_, set(testing::Ref(headers), false));
    EXPECT_CALL(*request_id_extension_, set(_, true)).Times(0);
    callMutateRequestHeaders(headers, Protocol::Http2);
    EXPECT_EQ(random_.uuid_, headers.get_(Headers::get().RequestId));
  }

   
  {
    TestRequestHeaderMapImpl headers{{"x-request-id", "my-request-id"}};
    EXPECT_CALL(*request_id_extension_, set(testing::Ref(headers), false));
    EXPECT_CALL(*request_id_extension_, set(_, true)).Times(0);
    callMutateRequestHeaders(headers, Protocol::Http2);
    EXPECT_EQ("my-request-id", headers.get_(Headers::get().RequestId));
  }
}