@Test
  public void testResumeTimeout() throws Exception {
    final CacheTransactionManager mgr = cache.getCacheTransactionManager();
    mgr.begin();
    region.put("key", "value");
    final TransactionId txId = mgr.suspend();
    mgr.resume(txId);
    final CountDownLatch latch = new CountDownLatch(1);
    Thread t = new Thread(() -> {
      assertFalse(mgr.tryResume(txId, 1, TimeUnit.SECONDS));
      latch.countDown();
    });
    long start = System.currentTimeMillis();
    t.start();
    latch.await();
    long end = System.currentTimeMillis();
    // other thread waits for 1 second
    assertTrue(end - start > 950);
    t.join();
    mgr.commit();
  }
two threads suspend and resume a single transaction, while making changes.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/TXManagerImplJUnitTest.java