@Test
  public void testTransactionTimeOut() throws Exception {
    Context jndiContext = cache.getJNDIContext();
    DataSource dataSource = (DataSource) jndiContext.lookup("java:/XAPooledDataSource");
    dataSource.getConnection();
    UserTransaction utx = (UserTransaction) jndiContext.lookup("java:/UserTransaction");
    utx.begin();
    utx.setTransactionTimeout(TRANSACTION_TIMEOUT_SECONDS);

    // sleep longer than the transaction timeout (nothing exposed to await on)
    Thread.sleep(Duration.ofSeconds(TRANSACTION_TIMEOUT_SECONDS * 2).toMillis());

    Throwable thrown = catchThrowable(utx::commit);

    assertThat(thrown)
        .isInstanceOf(IllegalStateException.class)
        .hasMessageContaining("Transaction is null, cannot commit a null transaction");
  }
Fixed up (best as possible) and re-enabled JTA tests from ExceptionsDUnitTest. Treat these as
characterization tests because I think some of this behavior is not strictly correct.
geode-core/src/integrationTest/java/org/apache/geode/internal/jta/TransactionTimeoutExceptionIntegrationTest.java