@Test
public void correctAuth() throws IOException {

    expect(request.getHeader("Authorization")).andReturn("Basic cm9sYW5kOnMhY3IhdA==");
    request.setAttribute(HttpContext.AUTHENTICATION_TYPE,HttpServletRequest.BASIC_AUTH);
    request.setAttribute(HttpContext.REMOTE_USER, "roland");
    replay(request,response);
    assertTrue(context.handleSecurity(request,response));
}