### Question:
JobDefinitionRestController extends HerdBaseController { @RequestMapping(value = "/jobDefinitions/namespaces/{namespace}/jobNames/{jobName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_JOB_DEFINITIONS_GET) public JobDefinition getJobDefinition(@PathVariable("namespace") String namespace, @PathVariable("jobName") String jobName) throws Exception { return jobDefinitionService.getJobDefinition(namespace, jobName); }  @RequestMapping(value = "/jobDefinitions", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_JOB_DEFINITIONS_POST) JobDefinition createJobDefinition(@RequestBody JobDefinitionCreateRequest request); @RequestMapping(value = "/jobDefinitions/namespaces/{namespace}/jobNames/{jobName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_JOB_DEFINITIONS_PUT) JobDefinition updateJobDefinition(@PathVariable("namespace") String namespace, @PathVariable("jobName") String jobName,
        @RequestBody JobDefinitionUpdateRequest request); @RequestMapping(value = "/jobDefinitions/namespaces/{namespace}/jobNames/{jobName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_JOB_DEFINITIONS_GET) JobDefinition getJobDefinition(@PathVariable("namespace") String namespace, @PathVariable("jobName") String jobName);  }### Answer:
@Test public void testGetJobDefinition() throws Exception { String namespace = NAMESPACE; String jobName = JOB_NAME; JobDefinition jobDefinition = getJobDefinition(NAMESPACE, JOB_NAME); when(jobDefinitionService.getJobDefinition(namespace, jobName)).thenReturn(jobDefinition); JobDefinition resultJobDefinition = jobDefinitionRestController.getJobDefinition(namespace, jobName); verify(jobDefinitionService).getJobDefinition(namespace, jobName); verifyNoMoreInteractions(jobDefinitionService); assertEquals(jobDefinition, resultJobDefinition); }