### Question:
ScheduleController { @RequestMapping(value = "/job/update", method = RequestMethod.PUT) public ResponseEntity<?> updateScheduleJob(@ModelAttribute JobRequest jobRequest) { log.debug("update schedule job :: jobRequest : {}", jobRequest); if (jobRequest.getJobName() == null) { return new ResponseEntity<>(new ApiResponse(false, "Require jobName"), HttpStatus.BAD_REQUEST); } JobKey jobKey = new JobKey(jobRequest.getJobName(), jobRequest.getJobGroup()); if (scheduleService.isJobExists(jobKey)) { if (jobRequest.isJobTypeSimple()) { scheduleService.updateJob(jobRequest); } else { scheduleService.updateJob(jobRequest); } } else { return new ResponseEntity<>(new ApiResponse(false, "Job does not exits"), HttpStatus.BAD_REQUEST); } return new ResponseEntity<>(new ApiResponse(true, "Job updated successfully"), HttpStatus.OK); }  @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 updateScheduleJob() throws Exception { given(scheduleService.updateJob(anyObject())).willReturn(true); given(scheduleService.isJobExists(anyObject())).willReturn(true); mvc.perform(put(BASE_PATH + "/job/update") .param("jobName", "job1") .param("jobGroup", "testGroup")) .andDo(print()) .andExpect(status().isOk()) .andExpect(jsonPath("$.success", is(true))); verify(scheduleService).updateJob(anyObject()); verify(scheduleService).isJobExists(anyObject()); }