TEST(HttpStatusChecker, SingleExpected100) {
  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: /healthcheck
    expected_statuses:
      - start: 100
        end: 101
  )EOF";

  auto conf = parseHealthCheckFromV3Yaml(yaml);
  HttpHealthCheckerImpl::HttpStatusChecker http_status_checker(
      conf.http_health_check().expected_statuses(), conf.http_health_check().retriable_statuses(),
      200);

  EXPECT_FALSE(http_status_checker.inExpectedRanges(200));

  EXPECT_FALSE(http_status_checker.inExpectedRanges(99));
  EXPECT_TRUE(http_status_checker.inExpectedRanges(100));
  EXPECT_FALSE(http_status_checker.inExpectedRanges(101));
}
TEST(HttpStatusChecker, SingleExpected100) {
  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: /healthcheck
    expected_statuses:
      - start: 100
        end: 101
  )EOF";

  auto conf = parseHealthCheckFromV3Yaml(yaml);
  HttpHealthCheckerImpl::HttpStatusChecker http_status_checker(
      conf.http_health_check().expected_statuses(), conf.http_health_check().retriable_statuses(),
      200);

  EXPECT_FALSE(http_status_checker.inExpectedRanges(200));

  EXPECT_FALSE(http_status_checker.inExpectedRanges(99));
  EXPECT_TRUE(http_status_checker.inExpectedRanges(100));
  EXPECT_FALSE(http_status_checker.inExpectedRanges(101));
}