use of org.springframework.integration.jms.StubMessageConverter in project spring-integration by spring-projects.
the class JmsOutboundGatewayParserTests method testDefault.
@Test
public void testDefault() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("jmsOutboundGatewayWithConverter.xml", this.getClass());
PollingConsumer endpoint = (PollingConsumer) context.getBean("jmsGateway");
DirectFieldAccessor accessor = new DirectFieldAccessor(endpoint);
JmsOutboundGateway gateway = (JmsOutboundGateway) accessor.getPropertyValue("handler");
accessor = new DirectFieldAccessor(gateway);
MessageConverter converter = (MessageConverter) accessor.getPropertyValue("messageConverter");
assertTrue("Wrong message converter", converter instanceof StubMessageConverter);
context.close();
}
Aggregations