Jta { public static void reset() { synchronized (initLock) { Jta.transactionManager = null; Jta.userTransaction = null; Jta.frozen = false; } } private  Jta(); static void configure(TransactionManager transactionManager, UserTransaction userTransaction); static void reset(); static boolean isFrozen(); static boolean isEnabled(); static TransactionManager getTransactionManager(); static UserTransaction getUserTransaction();  }
@Test public void testReset() throws Exception { assertFalse(Jta.isFrozen()); Jta.configure(transactionManager, userTransaction); assertTrue(Jta.isFrozen()); assertTrue(Jta.isEnabled()); assertSame(transactionManager, Jta.getTransactionManager()); assertSame(userTransaction, Jta.getUserTransaction()); Jta.reset(); assertFalse(Jta.isFrozen()); assertFalse(Jta.isEnabled()); }