### Question:
GlobalTransactionContext { public static GlobalTransaction reload(String xid) throws TransactionException { return new DefaultGlobalTransaction(xid, GlobalStatus.UnKnown, GlobalTransactionRole.Launcher) { @Override public void begin(int timeout, String name) throws TransactionException { throw new IllegalStateException("Never BEGIN on a RELOADED GlobalTransaction. "); } }; } private  GlobalTransactionContext(); static GlobalTransaction getCurrentOrCreate(); static GlobalTransaction reload(String xid);  }### Answer:
@Test void reloadTest() throws TransactionException { GlobalTransaction tx = GlobalTransactionContext.getCurrentOrCreate(); tx = GlobalTransactionContext.reload(DEFAULT_XID); GlobalTransaction finalTx = tx; Assertions.assertThrows(IllegalStateException.class, finalTx::begin); }