@Test
public void testRetrievingOutboundGatewayParser() throws Exception {
setUp("SmppOutboundGatewayParserTests.xml", getClass(), "smppOutboundGateway");
final AbstractMessageChannel inputChannel = TestUtils.getPropertyValue(this.consumer, "inputChannel", AbstractMessageChannel.class);
assertEquals("in", inputChannel.getComponentName());
final SmppOutboundGateway gateway = TestUtils.getPropertyValue(this.consumer, "handler", SmppOutboundGateway.class);
long sendTimeout = TestUtils.getPropertyValue(gateway, "messagingTemplate.sendTimeout", Long.class);
assertEquals(100, sendTimeout);
ExtendedSmppSession session = TestUtils.getPropertyValue(gateway, "smppSession", ExtendedSmppSession.class);
assertNotNull(session);
TypeOfNumber ton = TestUtils.getPropertyValue(gateway, "defaultSourceAddressTypeOfNumber", TypeOfNumber.class);
assertEquals(ton, TypeOfNumber.NETWORK_SPECIFIC);
String sourceAddress = TestUtils.getPropertyValue(gateway, "defaultSourceAddress", String.class);
assertEquals("123456789", sourceAddress);
int order = TestUtils.getPropertyValue(gateway, "order", Integer.class);
assertEquals(17, order);
AbstractMessageChannel outputChannel = TestUtils.getPropertyValue(gateway, "outputChannel", AbstractMessageChannel.class);
assertEquals("out", outputChannel.getComponentName());
// this is not set, should be default value
TimeFormatter timeFormatter = TestUtils.getPropertyValue(gateway, "timeFormatter", TimeFormatter.class);
assertNotNull(timeFormatter);
}