@Override
    public void beforeJob(JobExecution jobExecution) {
        LOG.debug("sending before job execution event [{}]...", jobExecution);
        producerTemplate.sendBodyAndHeader(endpointUri, jobExecution, EventType.HEADER_KEY, EventType.BEFORE.name());
        LOG.debug("sent before job execution event");
    }
@Test
    public void shouldSendBeforeJobEvent() throws Exception {
        // When
        jobExecutionListener.beforeJob(jobExecution);

        // Then
        assertEquals(jobExecution, consumer().receiveBody("seda:eventQueue"));
    }