### Question:
ScheduledReference { public boolean restore(ActionContext context) { Date scheduleEvent=context.getVariable(name, Date.class); if(scheduleEvent!=null){ context.logger().debug("A scheduled event was found and is being restored for {}",scheduleEvent); if(scheduleEvent.before(context.getLocalTime().getTime())){ scheduleEvent=context.getLocalTime().getTime(); context.setVariable(name,scheduleEvent); } context.wakeUpAt(scheduleEvent); return true; } return false; } ScheduledReference(String name); boolean isReferencedEvent(ActionContext context, RuleEvent event); boolean isReferencedEvent(ActionContext context, ScheduledEvent event); void setTimeout(ActionContext context, long delayMs); void setTimeout(ActionContext context, Date wakeup); boolean restore(ActionContext context); boolean hasScheduled(ActionContext context); void cancel(ActionContext context);  }### Answer:
@Test public void testRestore() { reference = new ScheduledReference("testref"); assertFalse(reference.hasScheduled(context)); context.setVariable("testref", timeoutAt); reference.restore(context); assertTrue(reference.hasScheduled(context)); }