use of org.springframework.integration.event.outbound.ApplicationEventPublishingMessageHandler in project spring-integration by spring-projects.
the class EventOutboundChannelAdapterParserTests method validateEventParser.
@Test
public void validateEventParser() {
EventDrivenConsumer adapter = this.context.getBean("eventAdapter", EventDrivenConsumer.class);
Assert.assertNotNull(adapter);
DirectFieldAccessor adapterAccessor = new DirectFieldAccessor(adapter);
MessageHandler handler = (MessageHandler) adapterAccessor.getPropertyValue("handler");
Assert.assertTrue(handler instanceof ApplicationEventPublishingMessageHandler);
Assert.assertEquals(this.context.getBean("input"), adapterAccessor.getPropertyValue("inputChannel"));
Assert.assertTrue(TestUtils.getPropertyValue(handler, "publishPayload", Boolean.class));
}
Aggregations