public void testGallery() throws FailingHttpStatusCodeException, MalformedURLException, IOException, InterruptedException {
final HtmlPage page = webClient.getPage("http://localhost:8080/photark/");
final HtmlTable table = page.getHtmlElementById("tableGallery");
//testing the static part of the gallery
final String pageAsXml = page.asXml();
assertTrue(pageAsXml.contains("<a href=\"javascript:displayGallery()\" onmouseover=\"document.index.src=index_on.src\" onmouseout=\"document.index.src=index_off.src\" onmousedown=\"beforeClick();\">"));
assertTrue(pageAsXml.contains("<body onload=\"initGallery()\">"));
final String pageAsText = page.asText();
assertTrue(pageAsText.contains("Apache PhotArk Gallery"));