@SuppressWarnings("ConstantConditions") @Test public void verifyEarlyExecution() { TestClock clock = new TestClock(); clock.setTime(13, 0); JobRequest request = verifyExecutionAndSuccessfulReschedule(clock, TimeUnit.HOURS.toMillis(14), TimeUnit.HOURS.toMillis(15)); assertThat(request.getStartMs()).isEqualTo(TimeUnit.HOURS.toMillis(25)); assertThat(request.getEndMs()).isEqualTo(TimeUnit.HOURS.toMillis(26)); int id = DailyJob.schedule(DummyJobs.createBuilder(DummyJobs.SuccessDailyJob.class), TimeUnit.HOURS.toMillis(14), TimeUnit.HOURS.toMillis(15)); request = manager().getJobRequest(id); assertThat(request.getStartMs()).isEqualTo(TimeUnit.HOURS.toMillis(1)); assertThat(request.getEndMs()).isEqualTo(TimeUnit.HOURS.toMillis(2)); }
public static int schedule(@NonNull JobRequest.Builder baseBuilder, long startMs, long endMs) { return schedule(baseBuilder, true, startMs, endMs, false); }
DailyJob extends Job { public static int schedule(@NonNull JobRequest.Builder baseBuilder, long startMs, long endMs) { return schedule(baseBuilder, true, startMs, endMs, false); } }
DailyJob extends Job { public static int schedule(@NonNull JobRequest.Builder baseBuilder, long startMs, long endMs) { return schedule(baseBuilder, true, startMs, endMs, false); }  }
DailyJob extends Job { public static int schedule(@NonNull JobRequest.Builder baseBuilder, long startMs, long endMs) { return schedule(baseBuilder, true, startMs, endMs, false); }  static int schedule(@NonNull JobRequest.Builder baseBuilder, long startMs, long endMs); static void scheduleAsync(@NonNull JobRequest.Builder baseBuilder, long startMs, long endMs); static void scheduleAsync(@NonNull final JobRequest.Builder baseBuilder, final long startMs, final long endMs,
                                     @NonNull final JobRequest.JobScheduledCallback callback); static int startNowOnce(@NonNull JobRequest.Builder baseBuilder); }
DailyJob extends Job { public static int schedule(@NonNull JobRequest.Builder baseBuilder, long startMs, long endMs) { return schedule(baseBuilder, true, startMs, endMs, false); }  static int schedule(@NonNull JobRequest.Builder baseBuilder, long startMs, long endMs); static void scheduleAsync(@NonNull JobRequest.Builder baseBuilder, long startMs, long endMs); static void scheduleAsync(@NonNull final JobRequest.Builder baseBuilder, final long startMs, final long endMs,
                                     @NonNull final JobRequest.JobScheduledCallback callback); static int startNowOnce(@NonNull JobRequest.Builder baseBuilder);  }