final TransactionImple tm = new TransactionImple(0);
final TestSynchronization sync = new TestSynchronization();
tm.registerSynchronization(sync);
tm.setRollbackOnly();
assertEquals(TwoPhaseOutcome.PREPARE_NOTOK, tm.doPrepare());
tm.doRollback();
assertFalse(sync.isBeforeCompletionDone());
assertTrue(sync.isAfterCompletionDone());
assertEquals(javax.transaction.Status.STATUS_ROLLEDBACK, tm.getStatus());
}