@Test public void testTriggeredDate() { Date now = new Date(); Date then = new Date(now.getTime() + 60000L); try { trigger.triggered(now); trigger.triggered(then); fail("Trigger should have thrown an exception"); } catch (IllegalStateException e) { } }
public void triggered(Date date) { if (fired) throw new IllegalStateException("This trigger should be fired once only"); fired = true; }
FireOnceJobTrigger implements JobTrigger { public void triggered(Date date) { if (fired) throw new IllegalStateException("This trigger should be fired once only"); fired = true; } }
FireOnceJobTrigger implements JobTrigger { public void triggered(Date date) { if (fired) throw new IllegalStateException("This trigger should be fired once only"); fired = true; }  }
FireOnceJobTrigger implements JobTrigger { public void triggered(Date date) { if (fired) throw new IllegalStateException("This trigger should be fired once only"); fired = true; }  Date getNextExecutionAfter(Date date); @Override Object clone(); void triggered(Date date); void reset(); @Override String toString(); }
FireOnceJobTrigger implements JobTrigger { public void triggered(Date date) { if (fired) throw new IllegalStateException("This trigger should be fired once only"); fired = true; }  Date getNextExecutionAfter(Date date); @Override Object clone(); void triggered(Date date); void reset(); @Override String toString();  }