assertEquals(HttpStatus.SC_UNAUTHORIZED,method.getStatusCode());
assertTrue(method.getResponseBodyAsString().indexOf("<title>BasicAuth Servlet: GET</title>") >= 0);
assertTrue(method.getResponseBodyAsString().indexOf("<p>Not authorized.</p>") >= 0);
client.getState().setCredentials(
new AuthScope(getHost(), getPort(), "BasicAuthServlet"),
new UsernamePasswordCredentials("bad","creds"));
method = new GetMethod("/" + getWebappContext() + "/auth/basic");
try {
client.executeMethod(method);