@Test
    void verifySerializeToJson() throws Throwable {
        val criteria = new AttributeBasedRegisteredServiceAccessStrategyActivationCriteria()
            .setOperator(LogicalOperatorTypes.OR)
            .setAllowIfInactive(true)
            .setRequiredAttributes(Map.of("common-name", List.of("n@m3"), "cn", List.of("***")));
        val jsonFile = Files.createTempFile(RandomUtils.randomAlphabetic(8), ".json").toFile();
        MAPPER.writeValue(jsonFile, criteria);
        val policyRead = MAPPER.readValue(jsonFile, RegisteredServiceAccessStrategyActivationCriteria.class);
        assertEquals(criteria, policyRead);
    }
This is {@link AttributeBasedRegisteredServiceAccessStrategyActivationCriteriaTests}.

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