SMPPPacket packet = connection.readNextPacket();
Assert.assertNotNull(packet);
Assert.assertEquals(packet.getCommandId(), SMPPPacket.DELIVER_SM);
DeliverSM deliverSm = (DeliverSM) packet;
Assert.assertEquals(deliverSm.getEsmClass(), (byte) 0x04);
Assert.assertEquals(deliverSm.getSource().getAddress(), "2222");
Assert.assertEquals(deliverSm.getDestination().getAddress(), "1111");
Assert.assertEquals(deliverSm.getMessageText(), "id:12345 sub:001 dlvrd:001 submit date:" + sdf.format(submitDate) + " done date:" + sdf.format(doneDate) + " stat:DELIVRD err:0 text: ");
}