@Test
    void checkNotPreventedPolicy() throws Throwable {
        val resolver = new RegisteredServiceAuthenticationPolicyResolver(this.servicesManager,
            new DefaultAuthenticationServiceSelectionPlan(new DefaultAuthenticationServiceSelectionStrategy()));

        val transaction = CoreAuthenticationTestUtils.getAuthenticationTransactionFactory().newTransaction(RegisteredServiceTestUtils.getService("serviceid4"),
            RegisteredServiceTestUtils.getCredentialsWithSameUsernameAndPassword("casuser"));

        val policies = resolver.resolve(transaction);
        assertEquals(1, policies.size());
        assertInstanceOf(NotPreventedAuthenticationPolicy.class, policies.iterator().next());
    }
This is {@link RegisteredServiceAuthenticationPolicyResolverTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-services/src/test/java/org/apereo/cas/services/RegisteredServiceAuthenticationPolicyResolverTests.java