@Test
    void verifyCookieCreationByService() throws Throwable {
        val mgr = mock(ServicesManager.class);
        val registeredService = CoreAuthenticationTestUtils.getRegisteredService();
        val policy = new DefaultRegisteredServiceSingleSignOnParticipationPolicy();
        policy.setCreateCookieOnRenewedAuthentication(TriStateBoolean.FALSE);
        when(registeredService.getSingleSignOnParticipationPolicy()).thenReturn(policy);
        when(mgr.findServiceBy(any(Service.class))).thenReturn(registeredService);

        val context = MockRequestContext.create(applicationContext);

        WebUtils.putServiceIntoFlowScope(context, CoreAuthenticationTestUtils.getWebApplicationService());
        val plan = new DefaultAuthenticationServiceSelectionPlan(new DefaultAuthenticationServiceSelectionStrategy());
        val sso = new SingleSignOnProperties().setCreateSsoCookieOnRenewAuthn(false).setRenewAuthnEnabled(true);
        val strategy = new DefaultSingleSignOnParticipationStrategy(mgr, sso, mock(TicketRegistrySupport.class), plan);
        WebUtils.putAuthentication(CoreAuthenticationTestUtils.getAuthentication("casuser"), context);

        val ssoRequest = getSingleSignOnParticipationRequest(context);
        val create = strategy.isCreateCookieOnRenewedAuthentication(ssoRequest);
        assertTrue(create.isFalse());
    }
This is {@link DefaultSingleSignOnParticipationStrategyTests}.

@author Misagh Moayyed
@since 6.1.0
core/cas-server-core-webflow/src/test/java/org/apereo/cas/web/flow/DefaultSingleSignOnParticipationStrategyTests.java