@Test
  public void testStartAfterComplete() throws InterruptedException {
    final long time = 10;
    ForeignExceptionListener listener = mock(ForeignExceptionListener.class);
    TimeoutExceptionInjector timer = new TimeoutExceptionInjector(listener, time);
    timer.complete();
    try {
      timer.start();
      fail("Timer should fail to start after complete.");
    } catch (IllegalStateException e) {
      LOG.debug("Correctly failed timer: " + e.getMessage());
    }
    Thread.sleep(time + 1);
    verifyNoInteractions(listener);
  }
Demonstrate TimeoutExceptionInjector semantics -- completion means no more exceptions passed to
error listener.
hbase-server/src/test/java/org/apache/hadoop/hbase/errorhandling/TestTimeoutExceptionInjector.java