super(baseURL);
}
public void run() {
try {
HtmlPage page = (HtmlPage) client
.getPage(baseURL + "/some-stateful/set-var?var=statetest1");
DomNodeList<HtmlElement> elements = page.getElementsByTagName("h1");
checkEquals(1, elements.size());
HtmlElement h1 = elements.get(0);
checkEquals("some-stateful/set-var",
h1.getTextContent());
/* make a second request */
page = client.getPage(baseURL + "/some-stateful/get-var");
elements = page.getElementsByTagName("h2");
checkEquals(1, elements.size());
HtmlElement h2 = elements.get(0);
checkEquals("statetest1", h2.getTextContent());
} catch (Exception e) {
logger.error("error", e);