DefaultJobDefinition implements JobDefinition { public static void validateCron(String cron) { new CronSequenceGenerator(cron); } private  DefaultJobDefinition(final String jobType,
                                 final String jobName,
                                 final String description,
                                 final Optional<Duration> maxAge,
                                 final Optional<Duration> fixedDelay,
                                 final Optional<String> cron,
                                 final int restarts,
                                 final int retries,
                                 final Optional<Duration> retryDelay); static JobDefinition manuallyTriggerableJobDefinition(final String jobType,
                                                                 final String jobName,
                                                                 final String description,
                                                                 final int restarts,
                                                                 final Optional<Duration> maxAge); static JobDefinition manuallyTriggerableJobDefinition(final String jobType,
                                                                 final String jobName,
                                                                 final String description,
                                                                 final int restarts,
                                                                 final int retries,
                                                                 final Optional<Duration> maxAge); static JobDefinition cronJobDefinition(final String jobType,
                                                  final String jobName,
                                                  final String description,
                                                  final String cron,
                                                  final int restarts,
                                                  final Optional<Duration> maxAge); static JobDefinition retryableCronJobDefinition(final String jobType,
                                                           final String jobName,
                                                           final String description,
                                                           final String cron,
                                                           final int restarts,
                                                           final int retries,
                                                           final Duration retryDelay,
                                                           final Optional<Duration> maxAge); static DefaultJobDefinition fixedDelayJobDefinition(final String jobType,
                                                               final String jobName,
                                                               final String description,
                                                               final Duration fixedDelay,
                                                               final int restarts,
                                                               final Optional<Duration> maxAge); static DefaultJobDefinition retryableFixedDelayJobDefinition(final String jobType,
                                                                        final String jobName,
                                                                        final String description,
                                                                        final Duration fixedDelay,
                                                                        final int restarts,
                                                                        final int retries,
                                                                        final Optional<Duration> retryDelay,
                                                                        final Optional<Duration> maxAge); static void validateCron(String cron); @Override String jobType(); @Override String jobName(); @Override String description(); @Override Optional<Duration> maxAge(); @Override Optional<Duration> fixedDelay(); @Override Optional<String> cron(); @Override int restarts(); @Override int retries(); @Override Optional<Duration> retryDelay();  }
@Test public void shouldNotFailOnValidCron() { validateCron("* * * * * *"); validateCron("* 1,2,3 * * * *"); validateCron("* * * * * ?"); validateCron("* * * * * 0"); validateCron("* * 21 * * *"); }