assertEquals("My Page", myPage.getTitle());
}
@Test
public void testFollowingAnRelativeLinkWithContentLocationSetInHtmlResponseHeader() {
PageRequest pageRequest = addPageRequest("http://test.com",
newHtml("Test Page", "<a href=\"myPage.html\">myPage</a>"));
pageRequest.setContentLocation("http://www1.test.com");
addPageRequest("http://www1.test.com/myPage.html", newHtml("My Page", ""));
AbstractDocument page = agent().get("http://test.com");
Link link = page.links().find(contains("myPage"));
assertNotNull(link);