### Question:
ScheduleController { @RequestMapping(value = "/jobs", method = RequestMethod.GET) public StatusResponse getAllJobs() { return scheduleService.getAllJobs(); }  @RequestMapping(value = "/job", method = RequestMethod.POST) ResponseEntity<?> addScheduleJob(@ModelAttribute JobRequest jobRequest); @RequestMapping(value = "/job", method = RequestMethod.DELETE) ResponseEntity<?> deleteScheduleJob(@ModelAttribute JobRequest jobRequest); @RequestMapping(value = "/job/update", method = RequestMethod.PUT) ResponseEntity<?> updateScheduleJob(@ModelAttribute JobRequest jobRequest); @RequestMapping(value = "/jobs", method = RequestMethod.GET) StatusResponse 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 statusResponse = new StatusResponse(); statusResponse.setNumOfAllJobs(1); given(scheduleService.getAllJobs()).willReturn(statusResponse); mvc.perform(get(BASE_PATH + "/jobs")) .andDo(print()) .andExpect(status().isOk()) .andExpect(jsonPath("$.numOfAllJobs", is(1))); verify(scheduleService).getAllJobs(); }