@Override
  public <R> R run(Action<R, C, E> action) throws E, InterruptedException {
    return run(action, retryByDefault);
  }
@Test
  public void testRetriesExhaustedAndSurfacesFailure() {
    int maxRetries = 3;
    int succeedAfterAttempts = 5;
    try (MockClientPoolImpl mockClientPool =
        new MockClientPoolImpl(2, RetryableException.class, true, maxRetries)) {
      assertThatThrownBy(
              () -> mockClientPool.run(client -> client.succeedAfter(succeedAfterAttempts)))
          .isInstanceOf(RetryableException.class);
      assertThat(mockClientPool.reconnectionAttempts()).isEqualTo(maxRetries);
    }
  }