@Test
    void verifyNoAttributesWithPrincipal() throws Throwable {
        val context = getPrincipalResolutionContextBuilder()
            .returnNullIfNoAttributes(false)
            .principalNameTransformer(formUserId -> formUserId)
            .principalAttributeNames(CoreAuthenticationTestUtils.CONST_USERNAME)
            .useCurrentPrincipalId(false)
            .resolveAttributes(true)
            .activeAttributeRepositoryIdentifiers(CollectionUtils.wrapSet(PersonAttributeDao.WILDCARD))
            .build();

        val resolver = PersonDirectoryPrincipalResolver.newPersonDirectoryPrincipalResolver(PersonDirectoryPrincipalResolver.class, context);
        val credentials = CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword();
        val principal = resolver.resolve(credentials, Optional.empty());
        assertNotNull(principal);
    }
Test cases for {@link PersonDirectoryPrincipalResolver}.

@author Misagh Moayyed
@since 4.2
support/cas-server-support-person-directory-core/src/test/java/org/apereo/cas/authentication/principal/resolvers/PersonDirectoryPrincipalResolverTests.java