endpoint.getConfiguration().setDeliveryPersistent(true);
endpoint.getConfiguration().setReplyToDeliveryPersistent(false);
JmsProducer producer = endpoint.createProducer();
assertNotNull("The producer should not be null", producer);
JmsConsumer consumer = endpoint.createConsumer(dummyProcessor);
JmsOperations operations = consumer.getEndpointMessageListener().getTemplate();
assertTrue(operations instanceof JmsTemplate);
JmsTemplate template = (JmsTemplate)operations;
assertTrue("Wrong delivery mode on reply template; expected "
+ " DeliveryMode.NON_PERSISTENT but was DeliveryMode.PERSISTENT",
template.getDeliveryMode() == DeliveryMode.NON_PERSISTENT);