@Test
    void verifyValidationTicketAuthzFails() throws Throwable {
        val service = CoreAuthenticationTestUtils.getWebApplicationService("not-authorized");
        val registeredService = RegisteredServiceTestUtils.getRegisteredService(service.getId());
        registeredService.setAccessStrategy(new DefaultRegisteredServiceAccessStrategy());
        getServicesManager().save(registeredService);
        val request = new MockHttpServletRequest();
        request.addParameter(CasProtocolConstants.PARAMETER_SERVICE, service.getId());

        val ctx = CoreAuthenticationTestUtils.getAuthenticationResult(getAuthenticationSystemSupport(), service);
        val tId = getCentralAuthenticationService().createTicketGrantingTicket(ctx);
        val sId = getCentralAuthenticationService().grantServiceTicket(tId.getId(), service, ctx);
        request.addParameter(CasProtocolConstants.PARAMETER_TICKET, sId.getId());
        
        val modelAndView = this.serviceValidateController.handleRequestInternal(request, new MockHttpServletResponse());
        assertNotNull(modelAndView);
        assertNotNull(modelAndView.getView());
        assertTrue(modelAndView.getView().toString().contains("Failure"));
    }
Unit tests for {@link Cas20ResponseView}.

@author Misagh Moayyed
@since 4.0.0
support/cas-server-support-validation/src/test/java/org/apereo/cas/web/view/Cas20ResponseViewTests.java