public List<Job> toScheduledJobs(Instant from, Instant upTo) {
        List<Job> jobs = new ArrayList<>();
        Instant nextRun = getNextRun(from);
        while (nextRun.isBefore(upTo)) {
            jobs.add(toJob(new ScheduledState(nextRun, this)));
            nextRun = getNextRun(nextRun);
        }
        return jobs;
    }
@Test
    void testToScheduledJobsGetsAllJobsBetweenStartAndEndMultipleResults() {
        final RecurringJob recurringJob = aDefaultRecurringJob()
                .withCronExpression("*/5 * * * * *")
                .build();

        final List<Job> jobs = recurringJob.toScheduledJobs(now().minusSeconds(15), now().plusSeconds(5));

        assertThat(jobs).hasSize(4);
    }