### Question:
JobExecutionService { public JobExecution jobExecution(long executionId) { org.springframework.batch.core.JobExecution jobExecution = jobExplorer.getJobExecution(executionId); if (jobExecution == null) throw new NoSuchJobExecutionException("Could not find job execution with ID " + executionId); return JobExecution.fromSpring(jobExecution); } @Autowired  JobExecutionService(JobExplorer jobExplorer, CachedJobExecutionProvider jobExecutionProvider, AdHocStarter adHocStarter); JobExecution jobExecution(long executionId); Collection<JobExecution> jobExecutions(Optional<String> jobNameRegexp,
                                                  Optional<String> exitCode,
                                                  int maxNumberOfExecutionsPerJobName); JobExecution launch(JobConfig jobConfig); Job job(String jobName);  }### Answer:
@Test public void jobExecutionsId() { JobExecution je = jobExecutionService.jobExecution(je11.getId()); assertThat(je).isNotNull(); }
@Test(expected = NoSuchJobExecutionException.class) public void jobExecutionsIdNotFound() { jobExecutionService.jobExecution(10); }
@Test(expected = NoSuchJobExecutionException.class) public void jobExecutionsIdNotFoundNegativeId() { jobExecutionService.jobExecution(-1); }