### Question:
AbortCountExceptionHandler implements ExceptionHandler { @Override public boolean handleException(Exception e, int ntries) throws InterruptedException { if (ntries > this.maximumTries) { return false; } else { this.sleepUnit.sleep(this.sleepDuration); return true; } } AbortCountExceptionHandler(int maximumTries, long sleepDuration, TimeUnit sleepUnit); @Override boolean handleException(Exception e, int ntries);  }### Answer:
@Test public void handleException_tooManyTries_returnsFalse() throws Exception { AbortCountExceptionHandler handler = new AbortCountExceptionHandler(1, 1, TimeUnit.SECONDS); assertFalse(handler.handleException(null, 3)); }
@Test public void handleException_wait_returnsTrue() throws Exception { AbortCountExceptionHandler handler = new AbortCountExceptionHandler(2, 1, TimeUnit.SECONDS); assertTrue(handler.handleException(null, 1)); }