@Test
public void findNTimesUnderlying() {

    when(webElement.findElement(By.xpath(".[count(//div)=5]"))).thenReturn(webElement2);
    Path path = BasicPath.builder().withUnderlying(webElement).withXpath("div").build();
    assertThat(InBrowserFinder.findPageWithNumberOfOccurrences(driverMock, path, 5), is(webElement2));
}