TEST_F(HttpConnectionManagerConfigTest, CustomRequestIDExtension) {
  const std::string yaml_string = R"EOF(
  stat_prefix: ingress_http
  route_config:
    name: local_route
  request_id_extension:
    typed_config:
      "@type": type.googleapis.com/test.http_connection_manager.CustomRequestIDExtension
      test_field: example
  http_filters:
  - name: envoy.filters.http.router
  )EOF";

  TestRequestIDExtensionFactory factory;
  Registry::InjectFactory<Server::Configuration::RequestIDExtensionFactory> registration(factory);

  HttpConnectionManagerConfig config(parseHttpConnectionManagerFromYaml(yaml_string), context_,
                                     date_provider_, route_config_provider_manager_,
                                     scoped_routes_config_provider_manager_, http_tracer_manager_,
                                     filter_config_provider_manager_);
  auto request_id_extension =
      dynamic_cast<TestRequestIDExtension*>(config.requestIDExtension().get());
  ASSERT_NE(nullptr, request_id_extension);
  EXPECT_EQ("example", request_id_extension->testField());
}
TEST_F(HttpConnectionManagerConfigTest, CustomRequestIDExtension) {
  const std::string yaml_string = R"EOF(
  stat_prefix: ingress_http
  route_config:
    name: local_route
  request_id_extension:
    typed_config:
      "@type": type.googleapis.com/test.http_connection_manager.CustomRequestIDExtension
      test_field: example
  http_filters:
  - name: envoy.filters.http.router
  )EOF";

  TestRequestIDExtensionFactory factory;
  Registry::InjectFactory<Server::Configuration::RequestIDExtensionFactory> registration(factory);

  HttpConnectionManagerConfig config(parseHttpConnectionManagerFromYaml(yaml_string), context_,
                                     date_provider_, route_config_provider_manager_,
                                     scoped_routes_config_provider_manager_, http_tracer_manager_,
                                     filter_config_provider_manager_);
  auto request_id_extension =
      dynamic_cast<TestRequestIDExtension*>(config.requestIDExtension().get());
  ASSERT_NE(nullptr, request_id_extension);
  EXPECT_EQ("example", request_id_extension->testField());
}