@Test
    void verifySerializeToJson() throws IOException {
        val jsonFile = Files.createTempFile(RandomUtils.randomAlphabetic(8), ".json").toFile();
        val policyWritten = new DefaultRegisteredServiceAcceptableUsagePolicy();
        policyWritten.setEnabled(true);
        policyWritten.setMessageCode("example.code");
        policyWritten.setText("example text");
        MAPPER.writeValue(jsonFile, policyWritten);
        val policyRead = MAPPER.readValue(jsonFile, DefaultRegisteredServiceAcceptableUsagePolicy.class);
        assertEquals(policyWritten, policyRead);
    }
This is {@link DefaultRegisteredServiceAcceptableUsagePolicyTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-authentication-attributes/src/test/java/org/apereo/cas/services/DefaultRegisteredServiceAcceptableUsagePolicyTests.java