@Test
public void testRetryHarness() throws InterruptedException, Exception {

  Retryable retry = new Retryable() {
    int totaltries = 0;
    public boolean doTry() {
      totaltries++;
      if (totaltries < 3) {
        return false;
      }
      totaltries = 0;
      return true;
    }
  };
  
  RetryHarness harness = new RetryHarness(retry, new FixedRetryPolicy(3));
  Assert.assertTrue(harness.attempt());
  harness = new RetryHarness(retry, new FixedRetryPolicy(1));
  Assert.assertFalse(harness.attempt());
}