@Test
    void verifySerializeToJson() throws Throwable {
        val jsonFile = Files.createTempFile(RandomUtils.randomAlphabetic(8), ".json").toFile();
        val chain = new ChainingRegisteredServiceAttributeReleaseActivationCriteria().setOperator(LogicalOperatorTypes.AND);
        val criteria1 = new AttributeBasedRegisteredServiceAttributeReleaseActivationCriteria()
            .setRequiredAttributes(Map.of("cn", List.of("name1", "name2")));
        val criteria2 = new GroovyRegisteredServiceAttributeReleaseActivationCriteria()
            .setGroovyScript("groovy { return false }");
        chain.addConditions(criteria1, criteria2);
        MAPPER.writeValue(jsonFile, chain);
        val policyRead = MAPPER.readValue(jsonFile, ChainingRegisteredServiceAttributeReleaseActivationCriteria.class);
        assertEquals(chain, policyRead);
    }
This is {@link ChainingRegisteredServiceAttributeReleaseActivationCriteriaTests}.

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