@Override
    public RetryStrategy getNextRetryStrategy() {
        int nextRemainingRetries = remainingRetries - 1;
        Preconditions.checkState(
                nextRemainingRetries >= 0, "The number of remaining retries must not be negative");
        return new FixedRetryStrategy(nextRemainingRetries, retryDelay);
    }
@Test
    void testRetryFailure() {
        assertThatThrownBy(
                        () ->
                                new FixedRetryStrategy(0, Duration.ofMillis(5L))
                                        .getNextRetryStrategy())
                .isInstanceOf(IllegalStateException.class);
    }