tx.enlistResource(r2_1);
tx.enlistResource(r2_2);
tx.delistResource(r1_1, XAResource.TMSUCCESS);
tx.delistResource(r1_2, XAResource.TMSUCCESS);
tx.delistResource(r2_1, XAResource.TMSUCCESS);
tx.delistResource(r2_2, XAResource.TMSUCCESS);
assertEquals(XAResource.XA_OK, tm.prepare(tx));
assertTrue(!r1_1.isCommitted() & !r1_2.isCommitted());
assertTrue(r1_1.isPrepared() ^ r1_2.isPrepared());
assertTrue(!r1_1.isRolledback() & !r1_2.isRolledback());
assertTrue(!r2_1.isCommitted() & !r2_2.isCommitted());