@Test
public void customElementTest() {

    Path el = BasicPath.customElement("div").after(span);
    NodeList nodes = findAllByXpath("<div>foo</div><span></span>><div>bar</div>", el);
    assertThat(nodes.getLength(), is(1));
    assertThat(getText(nodes.item(0)), equalTo("bar"));
    assertThat(el.toString(), is(equalTo("div, after span")));
}