### Question:
JobService { public Collection<Job> jobs() { return jobRegistry.getJobNames().stream().map(n -> new Job(n)).collect(toSet()); } @Autowired  JobService(JobRegistry jobRegistry); Collection<Job> jobs(); Job job(String jobName);  }### Answer:
@Test public void jobs() { Collection<Job> jobs = jobService.jobs(); assertThat(jobs).hasSize(2); }