@Test
public void testSignalJob() throws Exception
{

    // Create a job signal request.
    JobSignalRequest jobSignalRequest =
        new JobSignalRequest(JOB_ID, JOB_RECEIVE_TASK_ID, Arrays.asList(new Parameter(ATTRIBUTE_NAME_1_MIXED_CASE, ATTRIBUTE_VALUE_1)),
            new S3PropertiesLocation(S3_BUCKET_NAME, S3_KEY));
    // Create a job.
    Job job = new Job();
    job.setId(JOB_ID);
    // Mock the external calls.
    when(jobService.signalJob(jobSignalRequest)).thenReturn(job);
    // Call the method under test.
    Job result = jobRestController.signalJob(jobSignalRequest);
    // Verify the external calls.
    verify(jobService).signalJob(jobSignalRequest);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(job, result);
}