@Test
  @Parameters({"ENTRY_IDLE_DESTROY", "ENTRY_IDLE_INVALIDATE", "ENTRY_TTL_DESTROY",
      "ENTRY_TTL_INVALIDATE"})
  @TestCaseName("{method}({params})")
  public void entryExpirationContinuesAfterRollback(ExpirationOperation operation)
      throws Exception {
    Region<String, String> region = createRegion(REGION_NAME);

    AttributesMutator<String, String> mutator = region.getAttributesMutator();

    KeyCacheListener keyCacheListener = spy(new KeyCacheListener());
    mutator.addCacheListener(keyCacheListener);

    ExpiryTask.suspendExpiration();
    operation.mutate(mutator);

    region.put(KEY, "value1");

    transactionManager.begin();
    region.put(KEY, "value2");
    awaitEntryExpiration(region, KEY); // enables expiration
    assertThat(region.getEntry(KEY).getValue()).isEqualTo("value2");

    ExpiryTask.suspendExpiration();

    transactionManager.rollback();

    awaitEntryExpiration(region, KEY); // enables expiration
    operation.verifyInvoked(keyCacheListener);
    operation.verifyState(region);
  }
Tests transaction expiration functionality

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