@Test
    void verifyParticipationDisabledWithService() throws Throwable {
        val mgr = mock(ServicesManager.class);
        val registeredService = CoreAuthenticationTestUtils.getRegisteredService();
        when(registeredService.getAccessStrategy().isServiceAccessAllowedForSso(registeredService)).thenReturn(true);
        when(mgr.findServiceBy(any(Service.class))).thenReturn(registeredService);

        val context = MockRequestContext.create(applicationContext);

        val sso = new SingleSignOnProperties().setSsoEnabled(false);
        val plan = new DefaultAuthenticationServiceSelectionPlan(new DefaultAuthenticationServiceSelectionStrategy());
        val strategy = new DefaultSingleSignOnParticipationStrategy(mgr, sso, mock(TicketRegistrySupport.class), plan);
        WebUtils.putServiceIntoFlowScope(context, RegisteredServiceTestUtils.getService(registeredService.getServiceId()));

        val ssoRequest = getSingleSignOnParticipationRequest(context);
        assertFalse(strategy.isParticipating(ssoRequest));
    }
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