@Test
public void testFullUserMessageHeader() {

    UserMessage userMessage = new UserMessage();
    userMessage.setMessageId(UUID.randomUUID().toString());
    userMessage.setTimestamp(new Date());
    TradingPartner sender = new TradingPartner();
    sender.addPartyId(new PartyId("TheSender", null));
    sender.setRole("Sender");
    userMessage.setSender(sender);
    TradingPartner receiver = new TradingPartner();
    receiver.addPartyId(new PartyId("TheRecipient", null));
    receiver.setRole("Receiver");
    userMessage.setReceiver(receiver);
    CollaborationInfo collabInfo = new CollaborationInfo();
    collabInfo.setService(new Service("MultiHopTest"));
    collabInfo.setAction("CreateRoutingInput");
    userMessage.setCollaborationInfo(collabInfo);
    
    // Create a SOAP envelope that should contain the RoutingInput element
    final SOAPEnvelope    env = SOAPEnv.createEnvelope(SOAPEnv.SOAPVersion.SOAP_12);
    final OMElement ri = RoutingInput.createElement(env, userMessage);
    assertEquals(MultiHopConstants.ROUTING_INPUT_NS_URI, ri.getNamespaceURI());
    final Iterator<?> umChilds = ri.getChildrenWithLocalName("UserMessage");
    assertTrue(umChilds.hasNext());
    final OMElement umChild = (OMElement) umChilds.next();
    assertEquals(MultiHopConstants.ROUTING_INPUT_NS_URI, umChild.getNamespaceURI());
    final Iterator<?> ciChilds = umChild.getChildrenWithLocalName("CollaborationInfo");
    assertTrue(ciChilds.hasNext());
    final OMElement ciChild = (OMElement) ciChilds.next();
    assertEquals(EbMSConstants.EBMS3_NS_URI, ciChild.getNamespaceURI());
}