commandContext.getJobManager().schedule(timer);
return timer.getId();
}
});
AcquiredJobs acquiredJobs = commandExecutor.execute(new AcquireJobsCmd(jobExecutor));
List<List<String>> jobIdsList = acquiredJobs.getJobIdBatches();
assertEquals(0, jobIdsList.size());
List<String> expectedJobIds = new ArrayList<String>();
ClockUtil.setCurrentTime(new Date(SOME_TIME + (20 * SECOND)));
acquiredJobs = commandExecutor.execute(new AcquireJobsCmd(jobExecutor));
jobIdsList = acquiredJobs.getJobIdBatches();
assertEquals(1, jobIdsList.size());
List<String> jobIds = jobIdsList.get(0);
expectedJobIds.add(jobId);