@Test
    void checkAccessStrategyJson() {
        val attributes = new HashMap<String, Set<String>>();
        val v1 = new HashSet<String>();
        v1.add("admin");
        attributes.put("memberOf", v1);

        val service = RegisteredServiceTestUtils.getRegisteredService("test");
        val grouper = new GrouperRegisteredServiceAccessStrategy();
        grouper.setConfigProperties(CollectionUtils.wrap("hello", "world"));
        grouper.setRequiredAttributes(attributes);
        service.setAccessStrategy(grouper);

        val appCtx = new StaticApplicationContext();
        appCtx.refresh();
        val dao = new JsonServiceRegistry(RESOURCE, WatcherService.noOp(),
            appCtx,
            new NoOpRegisteredServiceReplicationStrategy(),
            new DefaultRegisteredServiceResourceNamingStrategy(),
            new ArrayList<>());
        val saved = dao.save(service);
        assertEquals(service, saved);
        assertFalse(dao.load().isEmpty());
    }
The {@link GrouperRegisteredServiceAccessStrategyTests} provides
test cases for {@link GrouperRegisteredServiceAccessStrategy}.

@author Misagh Moayyed
@since 4.2
support/cas-server-support-grouper/src/test/java/org/apereo/cas/grouper/services/GrouperRegisteredServiceAccessStrategyTests.java