@Test
public void hasSomeChildren() {

    Path el = BasicPath.element.that(hasNChildren(2));
    String xpath = el.getXPath().get();
    NodeList nodes = findAllByXpath("<div><x/>foo</div><div>foo</div><span><a/><b/></span>", el);
    assertThat(nodes.getLength(), is(1));
    assertThat(getElementName(nodes.item(0)), equalTo("span"));
    assertThat(el.toString(), is(equalTo("any element, that has 2 children")));
}