public void testMultipleEventExpire() throws Exception
{
TimedMockObject to = new CancelTimedMockObject();
TimerService service = createTimerService(to);
Timer timer = service.createTimer(new Date(System.currentTimeMillis() + 500), 500, null);
assertEquals("Expected one txtimer", 1, service.getTimers().size());
sleep(2000);
assertEquals("TimedObject not called", 1, to.getCallCount());
assertEquals("Expected no txtimer", 0, service.getTimers().size());
}