@Test public void failureTheSuccessBeforeCountShouldNotThrowsException() throws Exception { retry.attempt( () -> { if (i++ == 0) { throw new IllegalStateException(); } }); }
@Test public void failureAfterCountShouldThrowException() throws Exception { expectedException.expect(IllegalStateException.class); retry.attempt( () -> { throw new IllegalStateException(); }); }