@Test
    void verifyResolver() throws Throwable {
        val attributeMerger = CoreAuthenticationUtils.getAttributeMerger(casProperties.getAuthn().getAttributeRepository().getCore().getMerger());
        val resolver = PersonDirectoryPrincipalResolver.newPersonDirectoryPrincipalResolver(
            applicationContext, PrincipalFactoryUtils.newPrincipalFactory(),
            this.attributeRepository, attributeMerger, servicesManager,
            attributeDefinitionStore, attributeRepositoryResolver, casProperties.getPersonDirectory());
        val principal = resolver.resolve(new UsernamePasswordCredential("admin", "password"),
            Optional.of(CoreAuthenticationTestUtils.getPrincipal("admin")),
            Optional.of(new SimpleTestUsernamePasswordAuthenticationHandler()),
            Optional.of(CoreAuthenticationTestUtils.getService()));
        assertNotNull(principal);
        assertTrue(principal.getAttributes().containsKey("description"));
        assertTrue(principal.getAttributes().containsKey("entryDN"));
    }
This is {@link PersonDirectoryPrincipalResolverLdapTests}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-ldap/src/test/java/org/apereo/cas/authentication/PersonDirectoryPrincipalResolverLdapTests.java