// calculate all times from now
startTime = System.currentTimeMillis();
// This must cause a fixed-rate timer notification production
// with TIMES notification produced, spaced at PERIOD msecs, starting in now+PERIOD
timer.addNotification("timer.notification", null, null, new Date(startTime + PERIOD), PERIOD, TIMES, true);
long expectedDuration = FIXED_RATE_TOTAL;
waitForNotifications(TIMES, expectedDuration * 2);
long testDuration = System.currentTimeMillis() - startTime;