@Test
public void isPresentNTimesVariationFailed() {

    when(browser.findPageWithNumberOfOccurrences(any(), eq(5), eq(exactly))).thenThrow(new NoSuchElementException(""));
    when(browser.numberOfAppearances(any())).thenReturn(1);
    try {
        assertThat(span.inside(div), CustomMatchers.isPresent(5).timesIn(browser));
        fail("should fail");
    } catch (AssertionError e) {
        assertThat(e.getMessage(), is(equalTo("\nExpected: browser page contains (span, inside div) 5 times\n     but: (span, inside div) appears 1 time")));
    }
}