@Test
public void findNTimes() {

    when(driverMock.findElement(By.xpath("/html[count(//div)=5]"))).thenReturn(webElement2);
    assertThat(InBrowserFinder.findPageWithNumberOfOccurrences(driverMock, BasicPath.div, 5), is(equalTo(webElement2)));
}