request.setSession(new MockHttpSession());
    public void testNormalOperation() throws Exception {        // Setup our HTTP request        String token = "marissa:koala";        MockHttpServletRequest request = new MockHttpServletRequest();        request.addHeader("Authorization",            "Basic " + new String(Base64.encodeBase64(token.getBytes())));        request.setServletPath("/some_file.html");        // Launch an application context and access our bean        ApplicationContext ctx = new ClassPathXmlApplicationContext(                "net/sf/acegisecurity/ui/basicauth/filtertest-valid.xml");        BasicProcessingFilter filter = (BasicProcessingFilter) ctx.getBean(                "basicProcessingFilter");        // Setup our filter configuration        MockFilterConfig config = new MockFilterConfig();        // Setup our expectation that the filter chain will be invoked        MockFilterChain chain = new MockFilterChain(true);        MockHttpServletResponse response = new MockHttpServletResponse();        // Test        executeFilterInContainerSimulator(config, filter, request, response,            chain);        assertNotNull(SecurityContextHolder.getContext().getAuthentication());        assertEquals("marissa",            ((UserDetails) SecurityContextHolder.getContext().getAuthentication()                                                .getPrincipal()).getUsername());    }