@BeforeEach
    void setup() {
        val context = PrincipalResolutionContext.builder()
            .servicesManager(servicesManager)
            .attributeDefinitionStore(attributeDefinitionStore)
            .attributeRepositoryResolver(attributeRepositoryResolver)
            .attributeMerger(CoreAuthenticationUtils.getAttributeMerger(PrincipalAttributesCoreProperties.MergingStrategyTypes.REPLACE))
            .attributeRepository(CoreAuthenticationTestUtils.getAttributeRepository())
            .principalFactory(PrincipalFactoryUtils.newPrincipalFactory())
            .returnNullIfNoAttributes(false)
            .principalNameTransformer(formUserId -> formUserId)
            .useCurrentPrincipalId(false)
            .resolveAttributes(true)
            .applicationContext(applicationContext)
            .activeAttributeRepositoryIdentifiers(CollectionUtils.wrapSet(PersonAttributeDao.WILDCARD))
            .build();
        resolver = new X509SubjectDNPrincipalResolver(context);
        resolverRFC2253 = new X509SubjectDNPrincipalResolver(context);
        resolverRFC2253.setSubjectDnFormat(X500Principal.RFC2253);
        resolver.setX509AttributeExtractor(new DefaultX509AttributeExtractor());
        resolverRFC2253.setX509AttributeExtractor(new DefaultX509AttributeExtractor());
    }
@author Scott Battaglia
@author Jan Van der Velpen
@since 3.0.0
support/cas-server-support-x509-core/src/test/java/org/apereo/cas/adaptors/x509/authentication/principal/X509SubjectDNPrincipalResolverTests.java