loginConfig.setErrorPage("error.html");
loginConfig.setLoginPage("login.html");
final SimpleHttpRequest request = new SimpleHttpRequest();
request.setQueryString("j_security_check");
request.addParameter("j_username", "username");
request.addParameter("j_password", "password");
final SimpleHttpResponse response = new SimpleHttpResponse();
Assert.assertFalse(this.authenticator.authenticate(request, response, loginConfig));
Assert.assertEquals(304, response.getStatus());
Assert.assertEquals("error.html", response.getHeader("Location"));
Assert.assertEquals(1, response.getHeaderNames().length);