assertThat("Producer class", producer, instanceOf(BeanstalkProducer.class));
assertThat("Processor class", ((BeanstalkProducer) producer).getCommand(), instanceOf(ReleaseCommand.class));
when(client.release(jobId, priority, delay)).thenReturn(true);
final Exchange exchange = template.send(endpoint, ExchangePattern.InOnly, new Processor() {
public void process(Exchange exchange) {
exchange.getIn().setHeader(Headers.JOB_ID, jobId);
exchange.getIn().setHeader(Headers.PRIORITY, priority);
exchange.getIn().setHeader(Headers.DELAY, delay);
}