@Test public void testSetPeriod() { long newPeriod = 2 * period; long regularTriggerTime = startDate.getTime() + period; long adjustedTriggerTime = startDate.getTime() + newPeriod; assertEquals(regularTriggerTime, trigger.getNextExecutionAfter(startDate).getTime()); trigger.setPeriod(newPeriod); assertEquals(newPeriod, trigger.getPeriod()); assertEquals(adjustedTriggerTime, trigger.getNextExecutionAfter(startDate).getTime()); }
public void setPeriod(long period) { if (period <= 1) throw new IllegalArgumentException("Period needs to be a positive integer"); this.period = period; }
PeriodicJobTrigger implements JobTrigger { public void setPeriod(long period) { if (period <= 1) throw new IllegalArgumentException("Period needs to be a positive integer"); this.period = period; } }
PeriodicJobTrigger implements JobTrigger { public void setPeriod(long period) { if (period <= 1) throw new IllegalArgumentException("Period needs to be a positive integer"); this.period = period; } PeriodicJobTrigger(long period);  PeriodicJobTrigger(long period, boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime);  PeriodicJobTrigger(long period, Date startTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat, boolean startImmediately); }
PeriodicJobTrigger implements JobTrigger { public void setPeriod(long period) { if (period <= 1) throw new IllegalArgumentException("Period needs to be a positive integer"); this.period = period; } PeriodicJobTrigger(long period);  PeriodicJobTrigger(long period, boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime);  PeriodicJobTrigger(long period, Date startTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat, boolean startImmediately); @Override Object clone(); Date getNextExecutionAfter(Date date); void triggered(Date date); long getPeriod(); void setPeriod(long period); void setRepeatCount(long repeatCount); long getRepeatCount(); boolean getStartsImmediately(); void setStartImmediately(boolean startImmediately); void reset(); @Override String toString(); }
PeriodicJobTrigger implements JobTrigger { public void setPeriod(long period) { if (period <= 1) throw new IllegalArgumentException("Period needs to be a positive integer"); this.period = period; } PeriodicJobTrigger(long period);  PeriodicJobTrigger(long period, boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime);  PeriodicJobTrigger(long period, Date startTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      boolean startImmediately);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat);  PeriodicJobTrigger(long period, Date startTime, Date endTime,
      long repeat, boolean startImmediately); @Override Object clone(); Date getNextExecutionAfter(Date date); void triggered(Date date); long getPeriod(); void setPeriod(long period); void setRepeatCount(long repeatCount); long getRepeatCount(); boolean getStartsImmediately(); void setStartImmediately(boolean startImmediately); void reset(); @Override String toString();  }