}
}
@Test
public void shouldHaveURLInExceptionMessage() throws Exception {
HttpServerFake server = null;
try {
// precondition
this.serverFake.stop();
// RFC 1945 6.1.1 / Reason Phrase is optional
server = startHttpServerFake("HTTP/1.0 404 Not Found");
// operation
httpClient.get(server.getUrl(), IHttpClient.NO_TIMEOUT);
fail("Expected NotFoundException not thrown");
} catch (NotFoundException e) {
assertTrue(e.getMessage().contains(server.getUrl().toString()));
} finally {
server.stop();
}
}