@Test
  public void testNestedTransactionNotSupported() throws Exception {
    try {
      utx.begin();
      utx.begin();
      utx.commit();
      fail("Exception on nested transaction not thrown");
    } catch (NotSupportedException expected) {
      utx.commit();
    }
  }
Check if the correct expectations are being thrown when they are supposed to.
geode-core/src/integrationTest/java/org/apache/geode/internal/jta/ExceptionJUnitTest.java