assertEquals(SmppMessageType.DeliveryReceipt.toString(), smppMessage.getHeader(SmppConstants.MESSAGE_TYPE));
}
@Test
public void createSmppMessageFromDeliverSmShouldReturnASmppMessage() throws Exception {
DeliverSm deliverSm = new DeliverSm();
deliverSm.setShortMessage("Hello SMPP world!".getBytes());
deliverSm.setSequenceNumber(1);
deliverSm.setCommandId(1);
deliverSm.setSourceAddr("1818");
deliverSm.setSourceAddrNpi(NumberingPlanIndicator.NATIONAL.value());
deliverSm.setSourceAddrTon(TypeOfNumber.NATIONAL.value());
deliverSm.setDestAddress("1919");
deliverSm.setDestAddrNpi(NumberingPlanIndicator.INTERNET.value());
deliverSm.setDestAddrTon(TypeOfNumber.NETWORK_SPECIFIC.value());
deliverSm.setScheduleDeliveryTime("090831230627004+");
deliverSm.setValidityPeriod("090901230627004+");
deliverSm.setServiceType("WAP");
SmppMessage smppMessage = binding.createSmppMessage(deliverSm);
assertEquals("Hello SMPP world!", smppMessage.getBody());
assertEquals(12, smppMessage.getHeaders().size());
assertEquals(1, smppMessage.getHeader(SmppConstants.SEQUENCE_NUMBER));