TEST(SanMatcherConfigTest, TestValidSanType) {
  // Iterate over all san type enums.
  for (envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher::SanType san_type =
           envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher::SanType_MIN;
       san_type <=
       envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher::SanType_MAX;
       san_type = static_cast<
           envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher::SanType>(
           static_cast<int>(san_type + 1))) {
    envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher san_matcher;
    san_matcher.mutable_matcher()->set_exact("foo.example");
    san_matcher.set_san_type(san_type);
    if (san_type == envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher::
                        SAN_TYPE_UNSPECIFIED) {
      continue;
    } else {
      const SanMatcherPtr matcher = createStringSanMatcher(san_matcher);
      EXPECT_NE(matcher.get(), nullptr);
      // Verify that the message is valid.
      TestUtility::validate(san_matcher);
    }
  }
}
TEST(SanMatcherConfigTest, TestValidSanType) {
   
  for (envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher::SanType san_type =
           envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher::SanType_MIN;
       san_type <=
       envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher::SanType_MAX;
       san_type = static_cast<
           envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher::SanType>(
           static_cast<int>(san_type + 1))) {
    envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher san_matcher;
    san_matcher.mutable_matcher()->set_exact("foo.example");
    san_matcher.set_san_type(san_type);
    if (san_type == envoy::extensions::transport_sockets::tls::v3::SubjectAltNameMatcher::
                        SAN_TYPE_UNSPECIFIED) {
      continue;
    } else {
      const SanMatcherPtr matcher = createStringSanMatcher(san_matcher);
      EXPECT_NE(matcher.get(), nullptr);
       
      TestUtility::validate(san_matcher);
    }
  }
}