@Test(expectedExceptions = IllegalArgumentException.class,expectedExceptionsMessageRegExp = ".*BasicAuthentication.*")
public void invalidMethod() throws IOException {

    expect(request.getHeader("Authorization")).andReturn("unknown Blub");
    replay(request, response);
    context.handleSecurity(request,response);
}