policy.setMaximumRetryDelay(0L);
policy.setRetryDelay(50L);
for (int i = 0; i < 10; i++) {
long start = System.currentTimeMillis();
policy.doDelay(i);
long elapsed = System.currentTimeMillis() - start;
assertTrue(elapsed >= (policy.getRetryDelay() << i) - precision);
assertTrue(elapsed <= (policy.getRetryDelay() << i) + precision);
}
}