"<a href='"+page4.getURI()+"'>thislink</a>" +
"</body></html>");
con.setStructureInode(structure.getInode());
con=APILocator.getContentletAPI().checkin(con, sysuser, false);
APILocator.getContentletAPI().isInodeIndexed(con.getInode());
MultiTree mtree=new MultiTree();
mtree.setParent1(page1.getIdentifier());
mtree.setParent2(container.getIdentifier());
mtree.setChild(con.getIdentifier());
mtree.setTreeOrder(1);
MultiTreeFactory.saveMultiTree(mtree);
// that should be ok. It is in the same host where those pages are valid
invalids = APILocator.getLinkCheckerAPI().findInvalidLinks(con);
assertTrue(invalids!=null);
assertEquals(invalids.size(),0);
// now lets add some salt here. If the content is added in a page in host2 it
// should break the internal links
Folder home=APILocator.getFolderAPI().createFolders("/home/", host2, sysuser, false);
HTMLPage page5=new HTMLPage();
page5.setFriendlyName("something");
page5.setPageUrl("something."+pageExt);
page5.setTitle("something");
page5.setTemplateId(template.getIdentifier());
page5=APILocator.getHTMLPageAPI().saveHTMLPage(page5, template, home, sysuser, false);
mtree=new MultiTree();
mtree.setParent1(page5.getIdentifier());
mtree.setParent2(container.getIdentifier());
mtree.setChild(con.getIdentifier());
mtree.setTreeOrder(1);
MultiTreeFactory.saveMultiTree(mtree);
// now all those links should be broken
invalids = APILocator.getLinkCheckerAPI().findInvalidLinks(con);
assertTrue(invalids!=null);