@Test
public void testReadElement() throws Exception {

	String msgId = UUID.randomUUID().toString();
	Date timestamp = new Date();
	String refToMsgId = UUID.randomUUID().toString();
	
	UserMessage msgUnit = new UserMessage(); 
	MessageInfoElement.readElement(createXML(
    		"<eb3:MessageInfo xmlns:eb3=\"http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/\">" +
    		"    <eb3:Timestamp>" + Utils.toXMLDateTime(timestamp) + "</eb3:Timestamp>\n" + 
    		"    <eb3:MessageId>" + msgId + "</eb3:MessageId>\n" + 
    		"    <eb3:RefToMessageId>" + refToMsgId + "</eb3:RefToMessageId>\n" + 
    		"</eb3:MessageInfo>"), msgUnit);
	
	assertEquals(msgId, msgUnit.getMessageId());
	assertEquals(timestamp, msgUnit.getTimestamp());
	assertEquals(refToMsgId, msgUnit.getRefToMessageId());
}