public void test_Serialize_Deserialize()
throws Exception
{
Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
EPR epr = new LogicalEPR(new PortReference("logical:a#b"));
msg.getHeader().getCall().setTo(epr);
final String xmlRepresentation = XMLMessageUnitTest.msgToXML((MessageImpl)msg) ;
final MessageImpl nImpl = XMLMessageUnitTest.msgFromXML(xmlRepresentation) ;
EPR theEpr = nImpl.getHeader().getCall().getTo();
assertTrue("Expected a Logical EPR", theEpr instanceof LogicalEPR);
assertEquals("logical:a#b", theEpr.getAddr().getAddress());
}