@Test
  public void testSetRollBackOnly() throws Exception {
    // Asif : Test Exception when marking transaction for rollbackonly
    utx.begin();
    Thread thread = Thread.currentThread();
    Transaction txn = (Transaction) tm.getTransactionMap().get(thread);
    txn.registerSynchronization(new Synchronization() {

      @Override
      public void beforeCompletion() {
        try {
          utx.setRollbackOnly();
        } catch (Exception se) {
          fail("Set Roll Back only caused failure.Exception =" + se);
        }
      }

      @Override
      public void afterCompletion(int status) {
        assertTrue(status == Status.STATUS_ROLLEDBACK);
      }
    });
    try {
      utx.commit();
      fail("The commit should have thrown RolledBackException");
    } catch (RollbackException expected) {
      // success
    }
    assertTrue(tm.getGlobalTransactionMap().isEmpty());
  }
Test TransactionManagerImpl methods not tested by UserTransactionImplTest
geode-core/src/integrationTest/java/org/apache/geode/internal/jta/TransactionManagerImplJUnitTest.java