@Test
public void isBeforeTest() {

    Path el = BasicPath.element.that(isBefore(span.withClass("abc")));
    String xpath = el.getXPath().get();
    NodeList nodes = findAllByXpath("<div>a</div><div class='container'><div class='a'><div class='a.a'></div></div><span class='b'/></div><div>c</div><div></div><span class='abc'></span>", el);
    assertThat(nodes.getLength(), is(7));
    assertThat(el.toString(), is(equalTo("any element, that is before: (span, that has class abc)")));
}