@Test
public void andTest() {

    Path el = div.that(hasClass("a")).and(hasText("xyz"));
    NodeList nodes = findAllByXpath("<div>ab</div><div>xabc</div><div class='container'><div class='a dfdsf'>xyz<div class='a.a'></div></div><span class='b'/></div><div>c</div><div></div><span class='abc'></span>", el);
    assertThat(nodes.getLength(), is(1));
    assertThat(getText(nodes.item(0)), equalTo("xyz"));
    assertThat(getCssClass(nodes.item(0)), equalTo("a dfdsf"));
    assertThat(el.toString(), is(equalTo("div, that has class a, and has the text \"xyz\"")));
}