return ex;
}
private void check(ObjectName on, int hits, long remaining) throws Exception
{
SchedulableMBeanExampleMBean ex = get(on);
assertNotNull("name " + on, ex);
assertEquals("hits", hits, ex.getHitCount());
Date hd = ex.getHitDate();
if (hits > 0)
{
Date now = new Date();
assertNotNull("hit date", hd);
assertTrue("date " + hd + " " + now, !hd.after(now));
assertTrue("note", ex.getHitNotification() != null);
assertTrue("sched", ex.getSchedulerName() != null);
assertEquals("remaining", remaining, ex.getRemainingRepetitions());
}
assertEquals(null, ex.getTestString());
}