@Test
    void verifyExistingPrimaryProvider() throws Throwable {
        val strategy = getStrategy();
        val context = MockRequestContext.create(applicationContext);
        val provider = getProviderConfiguration("SomeClient");
        provider.setAutoRedirectType(DelegationAutoRedirectTypes.SERVER);

        val policy = new DefaultRegisteredServiceDelegatedAuthenticationPolicy();
        configureService(policy);

        DelegationWebflowUtils.putDelegatedAuthenticationProviderPrimary(context, null);
        val results = strategy.select(context, null, Set.of(provider));
        assertFalse(results.isEmpty());
        assertSame(DelegationAutoRedirectTypes.SERVER, results.get().getAutoRedirectType());
    }
This is {@link DefaultDelegatedClientIdentityProviderRedirectionStrategyTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-pac4j-core/src/test/java/org/apereo/cas/pac4j/clients/DefaultDelegatedClientIdentityProviderRedirectionStrategyTests.java