@Test
    void verifyView() throws Throwable {
        val modelAndView = this.getModelAndViewUponServiceValidationWithSecurePgtUrl(
            RegisteredServiceTestUtils.getService("https://www.casinthecloud.com"));
        val req = new MockHttpServletRequest(new MockServletContext());
        req.setAttribute(RequestContext.WEB_APPLICATION_CONTEXT_ATTRIBUTE,
            new GenericWebApplicationContext(req.getServletContext()));

        val resp = new MockHttpServletResponse();
        val delegatedView = new View() {
            @Override
            public String getContentType() {
                return MediaType.TEXT_HTML_VALUE;
            }
            @Override
            public void render(final Map<String, ?> map, final HttpServletRequest request, final HttpServletResponse response) {
                Objects.requireNonNull(map).forEach(request::setAttribute);
            }
        };
        val view = new Cas20ResponseView(true, new NoOpProtocolAttributeEncoder(),
            null, delegatedView, new DefaultAuthenticationAttributeReleasePolicy("attribute"),
            new DefaultAuthenticationServiceSelectionPlan(), NoOpProtocolAttributesRenderer.INSTANCE, getAttributeDefinitionStore());
        view.render(modelAndView.getModel(), req, resp);

        assertNull(req.getAttribute(CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXIES));
        assertNotNull(req.getAttribute(CasViewConstants.MODEL_ATTRIBUTE_NAME_PRIMARY_AUTHENTICATION));
        assertNotNull(req.getAttribute(CasViewConstants.MODEL_ATTRIBUTE_NAME_PRINCIPAL));
        assertNotNull(req.getAttribute(CasProtocolConstants.VALIDATION_CAS_MODEL_PROXY_GRANTING_TICKET_IOU));
    }
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