mcf.setResourceAdapter(ra);
QpidRAManagedConnection mc = (QpidRAManagedConnection)mcf.createManagedConnection(null, null);
AMQXAResource xa1 = (AMQXAResource)mc.getXAResource();
XAConnectionFactory factory = getConnectionFactory(FACTORY_NAME);
XAConnection connection = factory.createXAConnection("guest", "guest");
XASession s2 = connection.createXASession();
AMQXAResource xaResource = (AMQXAResource)connection.createXASession().getXAResource();
assertTrue("QpidRAXAResource and XAResource should be from the same RM", xa1.isSameRM(xaResource));
assertTrue("XAResource and QpidRAXAResource should be from the same RM", xaResource.isSameRM(xa1));