assertNull("There should be no current transaction associated.", tm.getTransaction());
// don't wait for ages, has to be set before TX is begun
tm.setTransactionTimeout(TRANSACTION_TIMEOUT_SECONDS);
XaTransaction muleTx = new XaTransaction(muleContext);
assertFalse(muleTx.isBegun());
assertEquals(Status.STATUS_NO_TRANSACTION, muleTx.getStatus());
muleTx.begin();
assertTrue(muleTx.isBegun());
muleTx.commit();
Transaction jtaTx = tm.getTransaction();
assertNull("Committing via TX Manager should have disassociated TX from the current thread.", jtaTx);
assertEquals(Status.STATUS_NO_TRANSACTION, muleTx.getStatus());
}