@Test
    void verifySsoAccessDisabledAllowsAccessWithCredentials() {
        val service = RegisteredServiceTestUtils.getRegisteredService();
        service.setAccessStrategy(new DefaultRegisteredServiceAccessStrategy(true, false));
        val tgt = mock(TicketGrantingTicket.class);
        when(tgt.getAuthentication()).thenReturn(RegisteredServiceTestUtils.getAuthentication());
        when(tgt.getCountOfUses()).thenReturn(0);
        
        assertDoesNotThrow(() -> RegisteredServiceAccessStrategyUtils.ensureServiceSsoAccessIsAllowed(service,
            RegisteredServiceTestUtils.getService(), tgt, true));
    }
This is {@link RegisteredServiceAccessStrategyUtilsTests}.

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