### Question:
ScheduleController { @RequestMapping(value = "/job/resume", method = RequestMethod.PUT) public ResponseEntity<?> resumeJob(@ModelAttribute JobRequest jobRequest) { JobKey jobKey = new JobKey(jobRequest.getJobName(), jobRequest.getGroupName()); if (scheduleService.isJobExists(jobKey)) { String jobState = scheduleService.getJobState(jobKey); if (jobState.equals("PAUSED")) { scheduleService.resumeJob(jobKey); } else { return new ResponseEntity<>(new ApiResponse(false, "Job is not in paused state"), HttpStatus.BAD_REQUEST); } } else { return new ResponseEntity<>(new ApiResponse(false, "Job does not exits"), HttpStatus.BAD_REQUEST); } return new ResponseEntity<>(new ApiResponse(true, "Job resumed successfully"), HttpStatus.OK); }  @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 resumeJob() throws Exception { given(scheduleService.resumeJob(anyObject())).willReturn(true); given(scheduleService.isJobExists(anyObject())).willReturn(true); given(scheduleService.getJobState(anyObject())).willReturn("PAUSED"); mvc.perform(put(BASE_PATH + "/job/resume") .param("jobName", "job1") .param("groupName", "testGroup")) .andDo(print()) .andExpect(status().isOk()) .andExpect(jsonPath("$.success", is(true))); verify(scheduleService).resumeJob(anyObject()); verify(scheduleService).isJobExists(anyObject()); verify(scheduleService).getJobState(anyObject()); }