TEST(HttpStatusChecker, InvalidRetriableRange) {
  const std::string yaml = R"EOF(
  timeout: 1s
  interval: 1s
  unhealthy_threshold: 2
  healthy_threshold: 2
  http_health_check:
    service_name_matcher:
        prefix: locations
    path: /healthchecka
    retriable_statuses:
      - start: 200
        end: 200
  )EOF";

  auto conf = parseHealthCheckFromV3Yaml(yaml);
  EXPECT_THROW_WITH_MESSAGE(HttpHealthCheckerImpl::HttpStatusChecker http_status_checker(
                                conf.http_health_check().expected_statuses(),
                                conf.http_health_check().retriable_statuses(), 200),
                            EnvoyException,
                            "Invalid http retriable status range: expecting start < end, but found "
                            "start=200 and end=200");
}
TEST(HttpStatusChecker, InvalidRetriableRange) {
  const std::string yaml = R"EOF(
  timeout: 1s
  interval: 1s
  unhealthy_threshold: 2
  healthy_threshold: 2
  http_health_check:
    service_name_matcher:
        prefix: locations
    path: /healthchecka
    retriable_statuses:
      - start: 200
        end: 200
  )EOF";

  auto conf = parseHealthCheckFromV3Yaml(yaml);
  EXPECT_THROW_WITH_MESSAGE(HttpHealthCheckerImpl::HttpStatusChecker http_status_checker(
                                conf.http_health_check().expected_statuses(),
                                conf.http_health_check().retriable_statuses(), 200),
                            EnvoyException,
                            "Invalid http retriable status range: expecting start < end, but found "
                            "start=200 and end=200");
}