public void testEntityBeanTimer()
throws Exception
{
TimerEntityHome home = (TimerEntityHome) getEJBHome(TimerEntityHome.JNDI_NAME);
TimerEntity entity = home.create(new Integer(111));
entity.startTimer(SHORT_PERIOD);
Thread.sleep(12 * SHORT_PERIOD);
entity.stopTimer();
int lCount = entity.getTimeoutCount();
assertTrue("Timeout was expected to be called at least 10 times but was "
+ "only called: " + lCount + " times",