@Test
    void verifyResponse() {
        val request = new MockHttpServletRequest();
        request.setParameter(CasProtocolConstants.PARAMETER_SERVICE, RegisteredServiceTestUtils.CONST_TEST_URL);
        val service = webApplicationServiceFactory.createService(request);
        assertFalse(service.getAttributes().isEmpty());
        assertFalse(service.getAttributeAs("service", List.class).isEmpty());
        assertFalse(service.getFirstAttribute("service", String.class).isEmpty());
        assertThrows(ClassCastException.class, () -> service.getAttributeAs("service", Double.class));
        val response = new WebApplicationServiceResponseBuilder(servicesManager, SimpleUrlValidator.getInstance())
            .build(service, "ticketId", RegisteredServiceTestUtils.getAuthentication());
        assertNotNull(response);
        assertEquals(Response.ResponseType.REDIRECT, response.responseType());
    }
@author Scott Battaglia
@author Arnaud Lesueur
@since 3.1
core/cas-server-core-services/src/test/java/org/apereo/cas/authentication/principal/SimpleWebApplicationServiceImplTests.java