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_ExecutionCountIsCorrectAfterMultipleExceptions() {
    AtomicInteger executeCounter = new AtomicInteger(0);
    Callable<Integer> incrementingFunction =
        () -> {
          executeCounter.incrementAndGet();
          throw new MyException();
        };
    try {
      retryCallableManager.retryCallable(incrementingFunction, ImmutableSet.of(MyException.class));
    } catch (RetryHelperException e) {
      // ignore exception to check the executeCounter
    }
    assertEquals(
        String.format("Should execute 4 times, instead executed %d times", executeCounter.get()),
        4,
        executeCounter.get());
  }