### Question:
TimeOfDayTrigger extends SimpleTrigger { @Override public void activate(ConditionContext context) { reschedule(context, context.getLocalTime()); } TimeOfDayTrigger(TimeOfDay executeAt); @Override void activate(ConditionContext context); @Override boolean handlesEventsOfType(RuleEventType type); @Override boolean shouldTrigger(ConditionContext context, RuleEvent event); @Override String toString();  }### Answer:
@Test public void testTriggersTommorrow() { ScheduledEvent event; Calendar expected; expected = RuleFixtures.time(9, 0, 0); expected.add(Calendar.DAY_OF_MONTH, 1); context.setLocalTime(time(12, 00, 00)); trigger.activate(context); event = context.getEvents().poll(); assertNotNull(event); assertEquals(expected.getTimeInMillis(), event.getScheduledTimestamp(), 1000); context.setLocalTime(time(24 + 8, 50, 00)); assertFalse(trigger.shouldFire(context, new ScheduledEvent())); assertNull(context.getEvents().poll()); expected = time(48 + 9, 00, 00); context.setLocalTime(time(24 + 9, 00, 00)); assertTrue(trigger.shouldFire(context, event)); event = context.getEvents().poll(); assertNotNull(event); assertEquals(expected.getTimeInMillis(), event.getScheduledTimestamp(), 1000); }