Calendar previousTimeout = firstTimeout;
for (int i = 1; i <= 65; i++) {
Calendar nextTimeout = calendarTimeout.getNextTimeout(previousTimeout);
Assert.assertNotNull("Next timeout is null", nextTimeout);
Assert.assertNotNull("Next timeout is *before* the current time", nextTimeout.after(previousTimeout));
logger.debug("First timeout was: " + firstTimeout.getTime() + " Previous timeout was: "
+ previousTimeout.getTime() + " Next timeout is " + nextTimeout.getTime());
long diff = nextTimeout.getTimeInMillis() - previousTimeout.getTimeInMillis();
long diffWithFirstTimeout = nextTimeout.getTimeInMillis() - firstTimeout.getTimeInMillis();
Assert.assertEquals("Unexpected timeout value: " + nextTimeout, 60 * 1000, diff);