@Test
        void checkAuthorizationFails() throws Throwable {
            val attributes = new HashMap<String, Set<String>>();
            attributes.put("scimGroups", Set.of("Tour Guides"));

            val strategy = new ScimRegisteredServiceAccessStrategy();
            strategy.setRequiredAttributes(attributes);

            val request = RegisteredServiceAccessStrategyRequest.builder()
                .service(RegisteredServiceTestUtils.getService())
                .principalId("casuser@example.com")
                .registeredService(RegisteredServiceTestUtils.getRegisteredService())
                .attributes(CoreAuthenticationTestUtils.getAttributes())
                .applicationContext(applicationContext)
                .build();

            val port = URI.create(casProperties.getScim().getTarget()).getPort();
            try (val webServer = new MockWebServer(port, new ClassPathResource("scim-user.json"), "application/scim+json")) {
                webServer.start();
                assertTrue(strategy.authorizeRequest(request));
            }
        }
This is {@link ScimRegisteredServiceAccessStrategyTests}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-scim/src/test/java/org/apereo/cas/scim/v2/ScimRegisteredServiceAccessStrategyTests.java