@Test
    void verifySerializeACompletePrincipalToJson() throws IOException {
        val request = new MockHttpServletRequest();
        request.setParameter(CasProtocolConstants.PARAMETER_SERVICE, RegisteredServiceTestUtils.CONST_TEST_URL);
        val serviceWritten = webApplicationServiceFactory.createService(request);
        MAPPER.writeValue(JSON_FILE, serviceWritten);
        val serviceRead = MAPPER.readValue(JSON_FILE, SimpleWebApplicationServiceImpl.class);
        assertEquals(serviceWritten, serviceRead);
    }
@author Scott Battaglia
@author Arnaud Lesueur
@since 3.1
core/cas-server-core-services/src/test/java/org/apereo/cas/authentication/principal/SimpleWebApplicationServiceImplTests.java