public void testOnePhaseCommitSync() throws Exception
{
final SubordinateTransaction tm = createTransaction();
final TestSynchronization sync = new TestSynchronization();
tm.registerSynchronization(sync);
tm.doOnePhaseCommit();
assertTrue(sync.isBeforeCompletionDone());
assertTrue(sync.isAfterCompletionDone());
assertEquals(javax.transaction.Status.STATUS_COMMITTED, tm.getStatus());
}