getFetcher().process(curi);
logger.info('\n' + httpRequestString(curi) + "\n\n" + rawResponseString(curi));
assertEquals(302, curi.getFetchStatus());
assertTrue(curi.getHttpResponseHeader("Location").startsWith("http://localhost:7779/login.html"));
PreconditionEnforcer preconditionEnforcer = new PreconditionEnforcer();
preconditionEnforcer.setServerCache(getFetcher().getServerCache());
preconditionEnforcer.setCredentialStore(getFetcher().getCredentialStore());
boolean result = preconditionEnforcer.credentialPrecondition(curi);
assertTrue(result);
CrawlURI loginUri = curi.getPrerequisiteUri();
assertEquals("http://localhost:7779/j_security_check", loginUri.toString());
// there's some special logic with side effects in here for the login uri itself
result = preconditionEnforcer.credentialPrecondition(loginUri);
assertFalse(result);
loginUri.setRecorder(getRecorder());
getFetcher().process(loginUri);
logger.info('\n' + httpRequestString(loginUri) + "\n\n" + rawResponseString(loginUri));