@Test
public void testFindingTwoLinks() {
addPageRequest("http://test.com",
newHtml("Test Page", "<a href=\"link1\">link1</a><a href=\"link2\">link2</a>"));
Resource page = agent().get("http://test.com");
List<HtmlElement> elements = ((HtmlDocument)page).htmlElements().findAll("a[href*='link']");//byHRef(regEx("link[0-9]")));
assertNotNull(elements);
assertEquals(2, elements.size());
assertEquals("link1", elements.get(0).getAttribute("href"));
assertEquals("link2", elements.get(1).getAttribute("href"));