@Test
public void testDeleteJob() throws Exception
{

    // Create a job delete request.
    JobDeleteRequest jobDeleteRequest = new JobDeleteRequest(ACTIVITI_JOB_DELETE_REASON);
    // Create a job.
    Job job = new Job();
    job.setId(JOB_ID);
    // Mock the external calls.
    when(jobService.deleteJob(JOB_ID, jobDeleteRequest)).thenReturn(job);
    // Call the method under test.
    Job result = jobRestController.deleteJob(JOB_ID, jobDeleteRequest);
    // Verify the external calls.
    verify(jobService).deleteJob(JOB_ID, jobDeleteRequest);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(job, result);
}