receiver.getMessageList().assertMessagesReceived(1);
}
public void testConsumerDefaultInOutJmsTx() throws Exception {
JmsComponent component = new JmsComponent();
JmsConsumerEndpoint endpoint = new JmsConsumerEndpoint();
endpoint.setService(new QName("jms"));
endpoint.setEndpoint("endpoint");
endpoint.setTargetService(new QName("echo"));
endpoint.setListenerType("default");
endpoint.setConnectionFactory(connectionFactory);
endpoint.setDestinationName("destination");
endpoint.setReplyDestinationName("replyDestination");
endpoint.setTransacted("jms");
endpoint.setMarshaler(new DefaultConsumerMarshaler(MessageExchangeSupport.IN_OUT));
component.setEndpoints(new JmsConsumerEndpoint[] {endpoint});
container.activateComponent(component, "servicemix-jms");
jmsTemplate.convertAndSend("destination", "<hello>world</hello>");
TextMessage msg = (TextMessage) jmsTemplate.receive("replyDestination");