### Question:
RetryBean { public int demonstrateRetry() { if (method1Counter < expectedAttempts) { method1Counter++; throw new RuntimeException("Oh noes! Some exception! Method Counter is currently: " + method1Counter); } return method1Counter; }  int demonstrateRetry(); @Retry(maxRetries = 5, abortOn = InterruptedException.class) int demonstrateAbort(boolean abort); void resetCounters(); static final int expectedAttempts; }### Answer:
@Test public void retryTest() { int numberOfAttempts = 0; numberOfAttempts = retryBean.demonstrateRetry(); Assert.assertTrue("Didn't get the expected number of attempts: " + numberOfAttempts, numberOfAttempts == RetryBean.expectedAttempts); }