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

            authenticationEventExecutionPlan.registerAuthenticationPreProcessor(transaction -> false);
            authenticationEventExecutionPlan.registerAuthenticationMetadataPopulators(
                Set.of(new RememberMeAuthenticationMetaDataPopulator(new RememberMeAuthenticationProperties())));
            authenticationEventExecutionPlan.registerAuthenticationHandlersWithPrincipalResolver(
                Set.of(new SimpleTestUsernamePasswordAuthenticationHandler()), new PersonDirectoryPrincipalResolver(context));
            authenticationEventExecutionPlan.registerAuthenticationPolicy(new AllCredentialsValidatedAuthenticationPolicy());
            authenticationEventExecutionPlan.registerAuthenticationPolicyResolver(transaction -> Set.of(new AllCredentialsValidatedAuthenticationPolicy()));
            assertFalse(authenticationEventExecutionPlan.getAuthenticationPolicies(
                CoreAuthenticationTestUtils.getAuthenticationTransactionFactory().newTransaction(
                    CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword())).isEmpty());
        }
This is {@link DefaultAuthenticationEventExecutionPlanTests}.

@author Misagh Moayyed
@since 6.3.0
core/cas-server-core-authentication/src/test/java/org/apereo/cas/authentication/DefaultAuthenticationEventExecutionPlanTests.java