GetMethod method = createGetMethod("/secured/authorized");
method.setDoAuthentication(true);
int status = client.executeMethod(method);
Assert.assertEquals(HttpResponseCodes.SC_OK, status);
Assert.assertEquals("authorized", method.getResponseBodyAsString());
method.releaseConnection();
}
{
GetMethod method = createGetMethod("/secured/deny");
method.setDoAuthentication(true);
int status = client.executeMethod(method);