TEST(HttpStatusChecker, ExpectedRanges_204_304) {
  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: 204
        end: 205
      - start: 304
        end: 305
  )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(203));
  EXPECT_TRUE(http_status_checker.inExpectedRanges(204));
  EXPECT_FALSE(http_status_checker.inExpectedRanges(205));
  EXPECT_FALSE(http_status_checker.inExpectedRanges(303));
  EXPECT_TRUE(http_status_checker.inExpectedRanges(304));
  EXPECT_FALSE(http_status_checker.inExpectedRanges(305));
}
TEST(HttpStatusChecker, ExpectedRanges_204_304) {
  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: 204
        end: 205
      - start: 304
        end: 305
  )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(203));
  EXPECT_TRUE(http_status_checker.inExpectedRanges(204));
  EXPECT_FALSE(http_status_checker.inExpectedRanges(205));
  EXPECT_FALSE(http_status_checker.inExpectedRanges(303));
  EXPECT_TRUE(http_status_checker.inExpectedRanges(304));
  EXPECT_FALSE(http_status_checker.inExpectedRanges(305));
}