TEST(HealthCheckerFactoryTest, GrpcHealthCheckHTTP2NotConfiguredException) {
  NiceMock<Upstream::MockClusterMockPrioritySet> cluster;
  EXPECT_CALL(*cluster.info_, features()).WillRepeatedly(Return(0));

  Runtime::MockLoader runtime;
  Event::MockDispatcher dispatcher;
  AccessLog::MockAccessLogManager log_manager;
  NiceMock<ProtobufMessage::MockValidationVisitor> validation_visitor;
  Api::MockApi api;

  EXPECT_THROW_WITH_MESSAGE(
      HealthCheckerFactory::create(createGrpcHealthCheckConfig(), cluster, runtime, dispatcher,
                                   log_manager, validation_visitor, api),
      EnvoyException, "fake_cluster cluster must support HTTP/2 for gRPC healthchecking");
}
TEST(HealthCheckerFactoryTest, GrpcHealthCheckHTTP2NotConfiguredException) {
  NiceMock<Upstream::MockClusterMockPrioritySet> cluster;
  EXPECT_CALL(*cluster.info_, features()).WillRepeatedly(Return(0));

  Runtime::MockLoader runtime;
  Event::MockDispatcher dispatcher;
  AccessLog::MockAccessLogManager log_manager;
  NiceMock<ProtobufMessage::MockValidationVisitor> validation_visitor;
  Api::MockApi api;

  EXPECT_THROW_WITH_MESSAGE(
      HealthCheckerFactory::create(createGrpcHealthCheckConfig(), cluster, runtime, dispatcher,
                                   log_manager, validation_visitor, api),
      EnvoyException, "fake_cluster cluster must support HTTP/2 for gRPC healthchecking");
}