sync();
stopTimer();
long endTime = timeOffset(0).getTime();
assertEquals(1, notifications.size());
TimerNotification tn = (TimerNotification) notifications.get(0);
assertEquals(MESSAGE, tn.getMessage());
assertEquals(1, tn.getSequenceNumber());
assertEquals(timerName, tn.getSource());
assertEquals(TIMER_TYPE, tn.getType());
assertEquals(USER_DATA, tn.getUserData());
assertEquals(id, tn.getNotificationID());
if (tn.getTimeStamp() < startTime + TimerSUITE.ZERO_TIME)
fail("Timer notification before start?");
if (tn.getTimeStamp() > endTime)
fail("Timer notification after end?");
}
finally
{
MBeanServerFactory.releaseMBeanServer(server);