@Test
public void hasAggregatedCaseSensitiveTextContainsTest() {

    Path el = div.that(hasAggregatedCaseSensitiveTextContaining("x Y"));
    String xpath = el.getXPath().get();
    NodeList nodes = findAllByXpath("<div>x   yz</div><div><span>zx </span><div>Yy</div></div><span>abc</span>", el);
    assertThat(nodes.getLength(), is(1));
    assertThat(getText(nodes.item(0).getFirstChild()), equalTo("zx "));
    assertThat(el.toString(), is(equalTo("div, with aggregated text containing \"x Y\"")));
}