@Override
    public long nextDelayDuration(int reconsumeTimes) {
        if (reconsumeTimes < 0) {
            reconsumeTimes = 0;
        }
        int index = reconsumeTimes + 2;
        if (index >= next.length) {
            index = next.length - 1;
        }
        return next[index];
    }
@Test
    public void testNextDelayDuration() {
        CustomizedRetryPolicy customizedRetryPolicy = new CustomizedRetryPolicy();
        long actual = customizedRetryPolicy.nextDelayDuration(0);
        assertThat(actual).isEqualTo(TimeUnit.SECONDS.toMillis(10));
        actual = customizedRetryPolicy.nextDelayDuration(10);
        assertThat(actual).isEqualTo(TimeUnit.MINUTES.toMillis(9));
    }