TEST_F(ConnectionManagerUtilityTest, RejectIfEscapedSlashesPresentAndConfiguredToReject) {
  ON_CALL(config_, pathWithEscapedSlashesAction())
      .WillByDefault(Return(envoy::extensions::filters::network::http_connection_manager::v3::
                                HttpConnectionManager::REJECT_REQUEST));
  TestRequestHeaderMapImpl original_headers;
  original_headers.setPath("/xyz%2F..//abc");

  TestRequestHeaderMapImpl header_map(original_headers);
  EXPECT_EQ(ConnectionManagerUtility::NormalizePathAction::Reject,
            ConnectionManagerUtility::maybeNormalizePath(header_map, config_));

  original_headers.setPath("/xyz%5c..//abc");
  header_map = original_headers;
  EXPECT_EQ(ConnectionManagerUtility::NormalizePathAction::Reject,
            ConnectionManagerUtility::maybeNormalizePath(header_map, config_));
}
TEST_F(ConnectionManagerUtilityTest, RejectIfEscapedSlashesPresentAndConfiguredToReject) {
  ON_CALL(config_, pathWithEscapedSlashesAction())
      .WillByDefault(Return(envoy::extensions::filters::network::http_connection_manager::v3::
                                HttpConnectionManager::REJECT_REQUEST));
  TestRequestHeaderMapImpl original_headers;
  original_headers.setPath("/xyz%2F..//abc");

  TestRequestHeaderMapImpl header_map(original_headers);
  EXPECT_EQ(ConnectionManagerUtility::NormalizePathAction::Reject,
            ConnectionManagerUtility::maybeNormalizePath(header_map, config_));

  original_headers.setPath("/xyz%5c..//abc");
  header_map = original_headers;
  EXPECT_EQ(ConnectionManagerUtility::NormalizePathAction::Reject,
            ConnectionManagerUtility::maybeNormalizePath(header_map, config_));
}