@Test
    void verifySerializeToJson() throws Throwable {
        val chain = new ChainingRegisteredServiceAccessStrategy();
        chain.setUnauthorizedRedirectUrl(new URI("https://google.com"));
        chain.setOperator(LogicalOperatorTypes.OR);
        chain.addStrategy(new DefaultRegisteredServiceAccessStrategy(false, true));
        chain.addStrategy(new DefaultRegisteredServiceAccessStrategy(true, false));

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

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