@Test
public void testCreateElementNoRefTo() throws Exception {

	// User Message without RefToMessageId
	UserMessage userMessage = new UserMessage();
	userMessage.setMessageId(UUID.randomUUID().toString());
	userMessage.setTimestamp(new Date());
	OMElement miElement = MessageInfoElement.createElement(createParent(), userMessage);
	
	assertNotNull(miElement);
	assertEquals(MESSAGE_INFO_ELEMENT_NAME, miElement.getQName());
	
	Iterator<OMElement> msgIdElems = miElement.getChildrenWithName(MESSAGE_ID_ELEMENT_NAME);
	assertFalse(Utils.isNullOrEmpty(msgIdElems));
	assertEquals(userMessage.getMessageId(), msgIdElems.next().getText());
	Iterator<OMElement> timestampElems = miElement.getChildrenWithName(TIMESTAMP_ELEMENT_NAME);
	assertFalse(Utils.isNullOrEmpty(timestampElems));    	
	assertEquals(Utils.toXMLDateTime(userMessage.getTimestamp()), timestampElems.next().getText());
	
	assertTrue(Utils.isNullOrEmpty(miElement.getChildrenWithName(REF_TO_MESSAGE_ID_ELEMENT_NAME)));
}