public <V> V retryCallable(
      Callable<V> callable, Set<Class<? extends Exception>> exceptionsToIntercept) {
    return RetryHelper.runWithRetries(
        callable,
        getRetrySettings(),
        getExceptionHandlerForExceptions(exceptionsToIntercept),
        NanoClock.getDefaultClock());
  }
@Test
  public void testRetryCallable_ReturnsExpected() {
    AtomicInteger executeCounter = new AtomicInteger(0);
    Callable<Integer> incrementingFunction =
        () -> {
          executeCounter.incrementAndGet();
          if (executeCounter.get() < 2) {
            throw new MyException();
          }
          return executeCounter.get();
        };
    Integer result =
        retryCallableManager.retryCallable(
            incrementingFunction, ImmutableSet.of(MyException.class));
    assertEquals(String.format("Should return 2, instead returned %d.", result), 2, (int) result);
  }