### Question:
ScheduleController { @GetMapping(value = "/jobs", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<?> getAllJobs() { return ResponseEntity.status(HttpStatus.OK).body(scheduleService.getAllJobs()); }  @RequestMapping(value = "/job", method = RequestMethod.POST) ResponseEntity<?> addScheduleJob(@ModelAttribute JobRequest jobRequest); @RequestMapping(value = "/job", method = RequestMethod.DELETE) ResponseEntity<?> deleteScheduleJob(
            @RequestParam(name = "jobName") String jobName,
            @RequestParam(name = "groupName") String groupName); @RequestMapping(value = "/job/update", method = RequestMethod.PUT) ResponseEntity<?> updateScheduleJob(@ModelAttribute JobRequest jobRequest); @GetMapping(value = "/jobs", produces = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<?> getAllJobs(); @RequestMapping(value = "/job/pause", method = RequestMethod.PUT) ResponseEntity<?> pauseJob(@ModelAttribute JobRequest jobRequest); @RequestMapping(value = "/job/resume", method = RequestMethod.PUT) ResponseEntity<?> resumeJob(@ModelAttribute JobRequest jobRequest); @RequestMapping(value = "/job/stop", method = RequestMethod.PUT) ResponseEntity<?> stopJob(@ModelAttribute JobRequest jobRequest);  }### Answer:
@Test public void getAllJobs() throws Exception { StatusResponse statsResponse = StatusResponse.builder() .numOfAllJobs(1) .build(); given(scheduleService.getAllJobs()).willReturn(statsResponse); mvc.perform(get(BASE_PATH + "/jobs")) .andDo(print()) .andExpect(status().isOk()) .andExpect(jsonPath("$.numOfAllJobs", is(1))); verify(scheduleService).getAllJobs(); }