@Test
  public void testUnblockOnCommit() 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(2);
    final CountDownLatch latch2 = new CountDownLatch(2);
    Thread t1 = new Thread(() -> {
      latch.countDown();
      assertFalse(mgr.tryResume(txId, 10, TimeUnit.SECONDS));
      latch2.countDown();
    });
    Thread t2 = new Thread(() -> {
      latch.countDown();
      assertFalse(mgr.tryResume(txId, 10, TimeUnit.SECONDS));
      latch2.countDown();
    });
    t1.start();
    t2.start();
    latch.await();
    Thread.sleep(100);
    long start = System.currentTimeMillis();
    mgr.commit();
    assertTrue("expected to wait for less than 100 millis, but waited for:"
        + (System.currentTimeMillis() - start), latch2.await(100, TimeUnit.MILLISECONDS));
    t1.join();
    t2.join();
  }
two threads suspend and resume a single transaction, while making changes.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/TXManagerImplJUnitTest.java