@Test
    void verifyFailureView() throws Throwable {
        val response = new MockHttpServletResponse();
        val view = getCasView(false, new NoOpProtocolAttributeEncoder(), getDelegatedView());
        val model = new HashMap<String, Object>();
        model.put(CasViewConstants.MODEL_ATTRIBUTE_NAME_ERROR_CODE, "code");
        model.put(CasViewConstants.MODEL_ATTRIBUTE_NAME_ERROR_DESCRIPTION, "description");
        val request = new MockHttpServletRequest();
        view.render(model, request, response);
        val casResponse = (CasJsonServiceResponse) request.getAttribute(Cas30JsonResponseView.ATTRIBUTE_NAME_MODEL_SERVICE_RESPONSE);
        assertNotNull(casResponse.getAuthenticationFailure().getCode());
        assertNotNull(casResponse.getAuthenticationFailure().getDescription());
    }
Unit tests for {@link Cas30ResponseView}.

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