stats.incrementAttempts();
assertFalse(stats.isPolicyExceeded());
}
public void shouldNotAttemptWhenMaxAttemptsExceeded() throws Exception {
RecurringStats stats = new RecurringStats(new RetryPolicy().withMaxAttempts(3));
stats.incrementAttempts();
stats.incrementAttempts();
assertFalse(stats.isPolicyExceeded());
stats.incrementAttempts();
assertTrue(stats.isPolicyExceeded());