@Test
    void verifyRequestWithCallbackAndDescription() throws Throwable {
        val service = addRegisteredService();
        val request = new MockHttpServletRequest();
        request.addParameter(OAuth20Constants.CLIENT_ID, service.getClientId());
        request.addParameter(OAuth20Constants.REDIRECT_URI, "https://github.com/apereo/cas");

        val response = new MockHttpServletResponse();
        val context = new JEEContext(request, response);
        assertFalse(oauthInvalidAuthorizationBuilder.supports(context));

        context.setRequestAttribute(OAuth20Constants.ERROR, OAuth20Constants.INVALID_REQUEST);
        context.setRequestAttribute(OAuth20Constants.ERROR_DESCRIPTION, "Invalid Request Description");
        context.setRequestAttribute(OAuth20Constants.ERROR_WITH_CALLBACK, true);
        assertTrue(oauthInvalidAuthorizationBuilder.supports(context));

        val mv = oauthInvalidAuthorizationBuilder.build(context);
        assertInstanceOf(RedirectView.class, mv.getView());
        val mvView = (RedirectView) mv.getView();
        assertEquals("https://github.com/apereo/cas", mvView.getUrl());
        assertTrue(mv.getModel().containsKey(OAuth20Constants.ERROR));
        assertTrue(mv.getModel().containsKey(OAuth20Constants.ERROR_DESCRIPTION));
        assertFalse(mv.getModel().containsKey(OAuth20Constants.STATE));

        val error = mv.getModel().get(OAuth20Constants.ERROR).toString();
        assertEquals(OAuth20Constants.INVALID_REQUEST, error);
        val errorDescription = mv.getModel().get(OAuth20Constants.ERROR_DESCRIPTION).toString();
        assertEquals("Invalid Request Description", errorDescription);
    }
This is {@link OAuth20InvalidAuthorizationResponseBuilderTests}.

@author Julien Huon
@since 6.4.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/web/response/callback/OAuth20InvalidAuthorizationResponseBuilderTests.java