@Test
public void hasAnyOfClassesTest() {

    Path el = BasicPath.element.that(hasAnyOfClasses("bar", "foo"));
    String xpath = el.getXPath().get();
    NodeList nodes = findAllByXpath("<div class=\"not-foo\"></div><div class=\" foo not\"></div><span class=\" foo\">abc</span>", el);
    assertThat(nodes.getLength(), is(2));
    assertThat(getCssClass(nodes.item(0)), equalTo(" foo not"));
    assertThat(getElementName(nodes.item(0)), equalTo("div"));
    assertThat(getCssClass(nodes.item(1)), equalTo(" foo"));
    assertThat(getElementName(nodes.item(1)), equalTo("span"));
    assertThat(el.toString(), is(equalTo("any element, that has at least one of the classes [bar, foo]")));
}