@Test
public void withClassesTest() {

    Path el = div.withClasses("a", "b");
    NodeList nodes = findAllByXpath("<div class=\"a\">a</div><div class=\"b\">b</div><div class=\"a b\">a b</div>", el);
    assertThat(nodes.getLength(), is(1));
    assertThat(getText(nodes.item(0)), equalTo("a b"));
    assertThat(el.toString(), is(equalTo("div, that has classes [a, b]")));
}