@Test
  @Parameters({"REGION_IDLE_DESTROY", "REGION_IDLE_INVALIDATE", "REGION_TTL_DESTROY",
      "REGION_TTL_INVALIDATE"})
  @TestCaseName("{method}({params})")
  public void regionExpirationDoesNotCauseConflict(ExpirationOperation operation) throws Exception {
    Region<String, String> region = createRegion(REGION_NAME);

    KeyCacheListener keyCacheListener = spy(new KeyCacheListener());

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

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

    transactionManager.begin();
    region.put(KEY, "value1");

    awaitRegionExpiration(region); // enables expiration
    assertThat(region.getEntry(KEY).getValue()).isEqualTo("value1");

    ExpiryTask.suspendExpiration();
    transactionManager.commit();

    assertThat(region.getEntry(KEY).getValue()).isEqualTo("value1");

    awaitRegionExpiration(region); // 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