@Test
  public void testEntryNotFound() {
    // make sure operations that should fail with EntryNotFoundException
    // do so when done transactionally
    try {
      try {
        region.destroy("noEntry");
        fail("expected EntryNotFoundException");
      } catch (EntryNotFoundException ignored) {
      }
      try {
        region.localDestroy("noEntry");
        fail("expected EntryNotFoundException");
      } catch (EntryNotFoundException ignored) {
      }
      try {
        region.invalidate("noEntry");
        fail("expected EntryNotFoundException");
      } catch (EntryNotFoundException ignored) {
      }
      try {
        region.localInvalidate("noEntry");
        fail("expected EntryNotFoundException");
      } catch (EntryNotFoundException ignored) {
      }

      txMgr.begin();
      try {
        region.destroy("noEntry");
        fail("expected EntryNotFoundException");
      } catch (EntryNotFoundException ignored) {
      }
      txMgr.rollback();
      txMgr.begin();
      try {
        region.localDestroy("noEntry");
        fail("expected EntryNotFoundException");
      } catch (EntryNotFoundException ignored) {
      }
      txMgr.rollback();
      txMgr.begin();
      try {
        region.invalidate("noEntry");
        fail("expected EntryNotFoundException");
      } catch (EntryNotFoundException ignored) {
      }
      txMgr.rollback();
      txMgr.begin();
      try {
        region.localInvalidate("noEntry");
        fail("expected EntryNotFoundException");
      } catch (EntryNotFoundException ignored) {
      }
      txMgr.rollback();

      // check to see if EntryExistsException works in transactions
      region.create("key1", "value1");
      try {
        region.create("key1", "value2");
        fail("expected EntryExistsException");
      } catch (EntryExistsException ignored) {
      }
      txMgr.begin();
      try {
        region.create("key1", "value2");
        fail("expected EntryExistsException");
      } catch (EntryExistsException ignored) {
      }
      txMgr.rollback();
    } catch (CacheException ex) {
      fail("unexpected " + ex);
    }
  }
Tests basic transaction functionality

@since GemFire 4.0
geode-core/src/integrationTest/java/org/apache/geode/TXJUnitTest.java