@Bean
    public PrincipalResolutionExecutionPlanConfigurer testPersonDirectoryPrincipalResolutionExecutionPlanConfigurer(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier(AttributeDefinitionStore.BEAN_NAME)
        final AttributeDefinitionStore attributeDefinitionStore,
        @Qualifier(ServicesManager.BEAN_NAME)
        final ServicesManager servicesManager,
        final CasConfigurationProperties casProperties,
        @Qualifier(PrincipalResolver.BEAN_NAME_ATTRIBUTE_REPOSITORY)
        final PersonAttributeDao attributeRepository,
        @Qualifier(AttributeRepositoryResolver.BEAN_NAME)
        final AttributeRepositoryResolver attributeRepositoryResolver) {
        return plan -> {
            val personDirectory = casProperties.getPersonDirectory();
            val attributeMerger = CoreAuthenticationUtils.getAttributeMerger(casProperties.getAuthn().getAttributeRepository().getCore().getMerger());
            val resolver = PersonDirectoryPrincipalResolver.newPersonDirectoryPrincipalResolver(
                applicationContext,
                PrincipalFactoryUtils.newPrincipalFactory(),
                attributeRepository, attributeMerger,
                servicesManager, attributeDefinitionStore,
                attributeRepositoryResolver, personDirectory);
            plan.registerPrincipalResolver(resolver);
        };
    }
This is {@link CasPersonDirectoryTestConfiguration}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-person-directory-core/src/test/java/org/apereo/cas/config/CasPersonDirectoryTestConfiguration.java