### Question:
JobHistoryService { @Transactional public Page<JobStatus> getAllJobs(Pageable pageable) { Page<JobStatus> jobStatusPage = jobStatusRepository.findAll(pageable); return jobStatusPage; }  JobHistory addJob(JobRequest jobRequest); JobStatus deleteJob(JobKey jobKey); JobStatus updateJob(JobKey jobKey); JobStatus pauseJob(JobKey jobKey); JobStatus resumeJob(JobKey jobKey); JobStatus stopJob(JobKey jobKey); @Transactional Page<JobStatus> getAllJobs(Pageable pageable);  }### Answer:
@Test @Transactional public void getAllJobs() { createJobHistory(testJobName, testGroupName, testJobType); Pageable pageRequest = PageRequest.of(0, 5, Sort.by("statusId").descending()); Page<JobStatus> statusPage = jobHistoryService.getAllJobs(pageRequest); assertThat(statusPage.getContent().get(0).getJobHistory().getJobName()).isEqualTo(testJobName); assertThat(statusPage.getContent().get(0).getJobHistory().getJobGroup()).isEqualTo(testGroupName); assertThat(statusPage.getContent().get(0).getJobState()).isEqualTo(StateType.CREATE); }