@Test
public void testRunSystemJobJmsPublisher() throws Exception
{

    // Create the system job run request.
    SystemJobRunRequest systemJobRunRequest = new SystemJobRunRequest(JmsPublishingJob.JOB_NAME, null);
    SystemJobRunResponse systemJobRunResponse = new SystemJobRunResponse(JmsPublishingJob.JOB_NAME, null);
    when(systemJobService.runSystemJob(systemJobRunRequest)).thenReturn(systemJobRunResponse);
    // Request to run the system job.
    SystemJobRunResponse resultSystemJobRunResponse = systemJobRestController.runSystemJob(systemJobRunRequest);
    // Verify the external calls.
    verify(systemJobService).runSystemJob(systemJobRunRequest);
    verifyNoMoreInteractions(systemJobService);
    // Validate the returned object.
    assertEquals(systemJobRunResponse, resultSystemJobRunResponse);
}