@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 the external calls.
    verify(jobDefinitionService).getJobDefinition(namespace, jobName);
    verifyNoMoreInteractions(jobDefinitionService);
    // Validate the returned object.
    assertEquals(jobDefinition, resultJobDefinition);
}