@Test
public void testWithRetryUntilElapsed()
{

    RetryPolicy retryPolicy = new RetryUntilElapsed(10000, 10000);
    CircuitBreaker circuitBreaker = new CircuitBreaker(retryPolicy, service);
    Assert.assertTrue(circuitBreaker.tryToOpen(() -> {}));
    Assert.assertEquals(lastDelay[0], Duration.ofMillis(10000));
}