public void trackFailure() {
        retryTime = TimeUtils.currentTime().plus(backoff);
        backoff = Duration.ofMillis((long) (backoff.toMillis() * params.multiplier));
        if (backoff.compareTo(params.maximumInterval) > 0)
            backoff = params.maximumInterval;
    }
@Test
    public void testInQueue() {
        PriorityQueue<ExponentialBackoff> queue = new PriorityQueue<>();
        ExponentialBackoff backoff1 = new ExponentialBackoff(params);
        backoff.trackFailure();
        backoff.trackFailure();
        backoff1.trackFailure();
        backoff1.trackFailure();
        backoff1.trackFailure();
        queue.offer(backoff);
        queue.offer(backoff1);

        assertEquals(queue.poll(), backoff); // The one with soonest retry time
        assertEquals(queue.peek(), backoff1);

        queue.offer(backoff);
        assertEquals(queue.poll(), backoff); // Still the same one
    }