    @Test
    public void testCorrectPass() throws Exception {


        Authentication token = new UsernamePasswordAuthenticationToken("user", "pass");
        AuthenticationManager manager = createMock(AuthenticationManager.class);
        processingFiler.setAuthenticationManager(manager);

        expect(request.getContextPath()).andReturn("/saml");
        expect(processor.retrieveMessage((SAMLMessageContext) notNull())).andReturn(new SAMLMessageContext());
        expect(manager.authenticate((Authentication) notNull())).andReturn(token);
        expect(request.getSession(true)).andReturn(session);
        expect(session.getAttribute("_springSamlStorageKey")).andReturn(new Hashtable());

        replay(manager);
        replayMock();
        Authentication authentication = processingFiler.attemptAuthentication(request, null);
        assertEquals(token, authentication);
        verifyMock();
        verify(manager);
    }