@Test
    void verifySerializeToJson() throws Throwable {
        val policy = new ReturnMappedAttributeReleasePolicy();
        val criteria = new AttributeBasedRegisteredServiceAttributeReleaseActivationCriteria()
            .setOperator(LogicalOperatorTypes.OR)
            .setRequiredAttributes(Map.of("common-name", List.of("n@m3"), "cn", List.of("***")));
        policy.setActivationCriteria(criteria);

        val jsonFile = Files.createTempFile(RandomUtils.randomAlphabetic(8), ".json").toFile();
        MAPPER.writeValue(jsonFile, policy);
        val policyRead = MAPPER.readValue(jsonFile, ReturnMappedAttributeReleasePolicy.class);
        assertEquals(policy, policyRead);
    }
This is {@link AttributeBasedRegisteredServiceAttributeReleaseActivationCriteriaTests}.

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