// xid1 has already been registered.
}
xaEnv.prepare(xid2);
XAEnvironment xaEnv2 = xaEnv;
Xid[] unfinishedXAXids = xaEnv2.recover(0);
assertTrue(unfinishedXAXids.length == 2);
boolean sawXid1 = false;
boolean sawXid2 = false;
for (int i = 0; i < 2; i++) {
if (unfinishedXAXids[i].equals(xid1)) {