@ParameterizedTest
    @MethodSource("getTestParameters")
    void verifyResolvePrincipalInternal(final X509Certificate certificate,
                                        final String expectedResult,
                                        final String alternatePrincipalAttribute,
                                        final X509AttributeExtractor x509AttributeExtractor,
                                        final boolean edipiExpected) {

        val context = PrincipalResolutionContext.builder()
            .attributeDefinitionStore(attributeDefinitionStore)
            .servicesManager(servicesManager)
            .applicationContext(applicationContext)
            .attributeRepositoryResolver(attributeRepositoryResolver)
            .attributeMerger(CoreAuthenticationUtils.getAttributeMerger(PrincipalAttributesCoreProperties.MergingStrategyTypes.REPLACE))
            .attributeRepository(CoreAuthenticationTestUtils.getAttributeRepository())
            .principalFactory(PrincipalFactoryUtils.newPrincipalFactory())
            .returnNullIfNoAttributes(false)
            .principalNameTransformer(formUserId -> formUserId)
            .useCurrentPrincipalId(false)
            .resolveAttributes(true)
            .activeAttributeRepositoryIdentifiers(CollectionUtils.wrapSet(PersonAttributeDao.WILDCARD))
            .build();

        val resolver = new X509CommonNameEDIPIPrincipalResolver(context);
        resolver.setAlternatePrincipalAttribute(alternatePrincipalAttribute);
        resolver.setX509AttributeExtractor(x509AttributeExtractor);

        val userId = resolver.resolvePrincipalInternal(certificate);
        assertEquals(expectedResult, userId);

        val attributes = resolver.extractPersonAttributes(certificate);
        if (edipiExpected) {
            assertEquals(attributes.get("x509EDIPI"), CollectionUtils.wrapList(expectedResult));
        } else {
            assertNull(attributes.get("x509EDIPI"));
        }
    }
Gets the unit test parameters.

@return Test parameter data.
support/cas-server-support-x509-core/src/test/java/org/apereo/cas/adaptors/x509/authentication/principal/X509CommonNameEDIPIPrincipalResolverTests.java