@Test
    void verifySerializeToJson() throws Throwable {
        val jsonFile = Files.createTempFile(RandomUtils.randomAlphabetic(8), ".json").toFile();
        val strategy = new GroovyRegisteredServiceAccessStrategyActivationCriteria();
        strategy.setGroovyScript("groovy { assert accessRequest != null; return false }");
        MAPPER.writeValue(jsonFile, strategy);
        val policyRead = MAPPER.readValue(jsonFile, RegisteredServiceAccessStrategyActivationCriteria.class);
        assertEquals(strategy, policyRead);
    }
This is {@link GroovyRegisteredServiceAccessStrategyActivationCriteriaTests}.

@author Misagh Moayyed
@since 7.0.0
core/cas-server-core-services-api/src/test/java/org/apereo/cas/services/GroovyRegisteredServiceAccessStrategyActivationCriteriaTests.java