@Test
public void testWithAdvice() throws Exception {
context = new ClassPathXmlApplicationContext("SmppOutboundGatewayParserTests.xml", getClass());
AbstractEndpoint endpoint = this.context.getBean("smppOutboundGatewayWithAdvice", AbstractEndpoint.class);
System.out.println("endpoint "+endpoint);
MessageHandler handler = TestUtils.getPropertyValue(endpoint, "handler", MessageHandler.class);
Message<?> message = MessageBuilder.withPayload("foo")
.setHeader(SmppConstants.SRC_ADDR, "X")
.setHeader(SmppConstants.DST_ADDR, "Y")
.build();
handler.handleMessage(message);
assertEquals(1, adviceCalled);
}