@Test(expected = IllegalArgumentException.class) public void shouldThrowIllegalArgumentExceptionIfMotechEventIsNullInRepeatingPeriodJob() { RepeatingPeriodSchedulableJob job = new RepeatingPeriodSchedulableJob(null, DateTime.now(), null, null, false, true, true); SchedulableJobValidator.validateRepeatingPeriodSchedulableJob(job); }
public static void validateRepeatingPeriodSchedulableJob(RepeatingPeriodSchedulableJob job) { notNull(job, JOB_CANNOT_BE_NULL); notNull(job.getRepeatPeriod(), "Repeat period cannot be null!"); validateEndingSchedulableJob(job); }
SchedulableJobValidator { public static void validateRepeatingPeriodSchedulableJob(RepeatingPeriodSchedulableJob job) { notNull(job, JOB_CANNOT_BE_NULL); notNull(job.getRepeatPeriod(), "Repeat period cannot be null!"); validateEndingSchedulableJob(job); } }
SchedulableJobValidator { public static void validateRepeatingPeriodSchedulableJob(RepeatingPeriodSchedulableJob job) { notNull(job, JOB_CANNOT_BE_NULL); notNull(job.getRepeatPeriod(), "Repeat period cannot be null!"); validateEndingSchedulableJob(job); } private  SchedulableJobValidator(); }
SchedulableJobValidator { public static void validateRepeatingPeriodSchedulableJob(RepeatingPeriodSchedulableJob job) { notNull(job, JOB_CANNOT_BE_NULL); notNull(job.getRepeatPeriod(), "Repeat period cannot be null!"); validateEndingSchedulableJob(job); } private  SchedulableJobValidator(); static void validateCronSchedulableJob(CronSchedulableJob job); static void validateRepeatingSchedulableJob(RepeatingSchedulableJob job); static void validateRepeatingPeriodSchedulableJob(RepeatingPeriodSchedulableJob job); static void validateRunOnceSchedulableJob(RunOnceSchedulableJob job); static void validateDayOfWeekSchedulableJob(DayOfWeekSchedulableJob job); }
SchedulableJobValidator { public static void validateRepeatingPeriodSchedulableJob(RepeatingPeriodSchedulableJob job) { notNull(job, JOB_CANNOT_BE_NULL); notNull(job.getRepeatPeriod(), "Repeat period cannot be null!"); validateEndingSchedulableJob(job); } private  SchedulableJobValidator(); static void validateCronSchedulableJob(CronSchedulableJob job); static void validateRepeatingSchedulableJob(RepeatingSchedulableJob job); static void validateRepeatingPeriodSchedulableJob(RepeatingPeriodSchedulableJob job); static void validateRunOnceSchedulableJob(RunOnceSchedulableJob job); static void validateDayOfWeekSchedulableJob(DayOfWeekSchedulableJob job);  }