request.setRequestURL("http:
    public void testFailedAuthenticationRedirectsAppropriately()        throws Exception {        // Setup our HTTP request        MockHttpServletRequest request = new MockHttpServletRequest("");        request.setServletPath("/j_mock_post");        // Setup our filter configuration        MockFilterConfig config = new MockFilterConfig();        // Setup our expectation that the filter chain will not be invoked, as we redirect to authenticationFailureUrl        MockFilterChain chain = new MockFilterChain(false);        MockHttpServletResponse response = new MockHttpServletResponse();        // Setup our test object, to deny access        MockAbstractProcessingFilter filter = new MockAbstractProcessingFilter(false);        filter.setAuthenticationFailureUrl("/myApp/failed.jsp");        // Test        executeFilterInContainerSimulator(config, filter, request, response,            chain);        assertEquals("/myApp/failed.jsp", response.getRedirect());        assertTrue(request.getSession().getAttribute(HttpSessionIntegrationFilter.ACEGI_SECURITY_AUTHENTICATION_KEY) == null);    }