TEST_F(HttpConnectionManagerConfigTest, PathWithEscapedSlashesActionSetAndDisabled) {
  const std::string yaml_string = R"EOF(
  stat_prefix: ingress_http
  path_with_escaped_slashes_action: UNESCAPE_AND_REDIRECT
  route_config:
    name: local_route
  http_filters:
  - name: envoy.filters.http.router
  )EOF";

  EXPECT_CALL(context_.runtime_loader_.snapshot_, featureEnabled(_, An<uint64_t>()))
      .WillRepeatedly(Invoke(&context_.runtime_loader_.snapshot_,
                             &Runtime::MockSnapshot::featureEnabledDefault));
  EXPECT_CALL(context_.runtime_loader_.snapshot_,
              featureEnabled("http_connection_manager.path_with_escaped_slashes_action_enabled",
                             An<const envoy::type::v3::FractionalPercent&>()))
      .WillOnce(Return(false));
  EXPECT_CALL(context_.runtime_loader_.snapshot_, getInteger(_, _)).Times(AnyNumber());
  EXPECT_CALL(context_.runtime_loader_.snapshot_,
              getInteger("http_connection_manager.path_with_escaped_slashes_action", 0))
      .Times(0);
  HttpConnectionManagerConfig config(parseHttpConnectionManagerFromYaml(yaml_string), context_,
                                     date_provider_, route_config_provider_manager_,
                                     scoped_routes_config_provider_manager_, http_tracer_manager_,
                                     filter_config_provider_manager_);
  EXPECT_EQ(envoy::extensions::filters::network::http_connection_manager::v3::
                HttpConnectionManager::KEEP_UNCHANGED,
            config.pathWithEscapedSlashesAction());
}
TEST_F(HttpConnectionManagerConfigTest, PathWithEscapedSlashesActionSetAndDisabled) {
  const std::string yaml_string = R"EOF(
  stat_prefix: ingress_http
  path_with_escaped_slashes_action: UNESCAPE_AND_REDIRECT
  route_config:
    name: local_route
  http_filters:
  - name: envoy.filters.http.router
  )EOF";

  EXPECT_CALL(context_.runtime_loader_.snapshot_, featureEnabled(_, An<uint64_t>()))
      .WillRepeatedly(Invoke(&context_.runtime_loader_.snapshot_,
                             &Runtime::MockSnapshot::featureEnabledDefault));
  EXPECT_CALL(context_.runtime_loader_.snapshot_,
              featureEnabled("http_connection_manager.path_with_escaped_slashes_action_enabled",
                             An<const envoy::type::v3::FractionalPercent&>()))
      .WillOnce(Return(false));
  EXPECT_CALL(context_.runtime_loader_.snapshot_, getInteger(_, _)).Times(AnyNumber());
  EXPECT_CALL(context_.runtime_loader_.snapshot_,
              getInteger("http_connection_manager.path_with_escaped_slashes_action", 0))
      .Times(0);
  HttpConnectionManagerConfig config(parseHttpConnectionManagerFromYaml(yaml_string), context_,
                                     date_provider_, route_config_provider_manager_,
                                     scoped_routes_config_provider_manager_, http_tracer_manager_,
                                     filter_config_provider_manager_);
  EXPECT_EQ(envoy::extensions::filters::network::http_connection_manager::v3::
                HttpConnectionManager::KEEP_UNCHANGED,
            config.pathWithEscapedSlashesAction());
}