@Test
public void isPresentNTimesVariationSuccess() {

    when(browser.findPageWithNumberOfOccurrences(any(), eq(5), eq(exactly))).thenReturn(mock(WebElement.class));
    when(browser.numberOfAppearances(any())).thenReturn(5);
    assertThat(span.inside(div), CustomMatchers.isPresent(5).timesIn(browser));
}