@Test
public void inRange() {

    Path el = listItem.that(withIndexInRange(2, 4));
    String xpath = el.getXPath().get();
    NodeList nodes = findAllByXpath("<li>1</li><li>2</li><li>3</li><li>4</li><li>5</li>", el);
    assertThat(nodes.getLength(), is(3));
    assertThat(getText(nodes.item(0)), equalTo("3"));
    assertThat(getText(nodes.item(1)), equalTo("4"));
    assertThat(getText(nodes.item(2)), equalTo("5"));
    assertThat(el.toString(), is(equalTo("list item, with index from 2 to 4")));
}