@Test
    void verifyOperationWithEx() {
        assertNotNull(delegatedAuthenticationAction);

        val request = new MockHttpServletRequest();
        request.addParameter("templates/error", "failure");
        request.setAttribute("jakarta.servlet.error.exception", UnauthorizedServiceException.denied("templates/error"));
        val mv = resolver.resolveErrorView(request, HttpStatus.FORBIDDEN, Map.of());
        assertEquals(HttpStatus.FORBIDDEN, mv.getStatus());
        assertEquals(CasWebflowConstants.VIEW_ID_DELEGATED_AUTHN_ERROR_VIEW, mv.getViewName());
    }
This is {@link DelegatedAuthenticationErrorViewResolverTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-pac4j-webflow/src/test/java/org/apereo/cas/web/flow/DelegatedAuthenticationErrorViewResolverTests.java