public static void runTest1() throws Exception {
    boolean exceptionOccurred = false;
    try {
      getSystemStatic().getLogWriter().fine("<ExpectedException action=add> +"
          + "DistributedSystemDisconnectedException" + "</ExpectedException>");
      Context ctx = cache.getJNDIContext();
      UserTransaction utx = (UserTransaction) ctx.lookup("java:/UserTransaction");
      utx.begin();
      assertThat(utx.getStatus() == Status.STATUS_ACTIVE);
      utx.setTransactionTimeout(2);
      waitUntilTransactionTimeout(utx);
      try {
        utx.commit();
      } catch (Exception e) {
        exceptionOccurred = true;
      }
      if (!exceptionOccurred) {
        fail("Exception did not occur although was supposed to occur");
      }
    } catch (Exception e) {
      LogWriterUtils.getLogWriter().fine("Exception caught " + e);
      fail("failed in naming lookup: " + e);
    } finally {
      getSystemStatic().getLogWriter().fine("<ExpectedException action=remove> +"
          + "DistributedSystemDisconnectedException" + "</ExpectedException>");
    }
  }
This test sees if the TransactionTimeOut works properly
geode-core/src/distributedTest/java/org/apache/geode/internal/jta/dunit/TxnTimeOutDUnitTest.java