XAResource res = conn1.createXASession().getXAResource();
Xid[] xids = res.recover(XAResource.TMSTARTRSCAN);
assertEquals(2, xids.length);
Xid[] xids2 = res.recover(XAResource.TMENDRSCAN);
assertEquals(0, xids2.length);
assertTrue(xids[0].equals(xid1) || xids[1].equals(xid1));
assertTrue(xids[0].equals(xid2) || xids[1].equals(xid2));