@Test
public void testOnApplicationEventJobExecution() {

    final JobInstance instance = new JobInstance(1L, "testJob");
    final JobExecution jobExecution = new JobExecution(1L);
    jobExecution.setJobInstance(instance);
    jobExecution.setExitStatus(ExitStatus.COMPLETED);
    final JobExecutionEvent jobExecutionEvent = new JobExecutionEvent(jobExecution, "testApplication");
    this.onJobExecutionFinishedEventListener.onApplicationEvent(jobExecutionEvent);
    Mockito.verify(this.jobExecutionEventPublisher, Mockito.times(1))
            .publishEvent(any(JobExecutionEventInfo.class));
}