@Test
  public void testUpdateResetsIdleTime() {
    final String name = getUniqueName();
    // test no longer waits for this timeout to expire
    final int timeout = 90; // seconds
    final Object key = "KEY";
    final Object value = "VALUE";

    vm0.invoke("Create with Idle", () -> {
      RegionFactory<Object, Object> regionFactory =
          getCache().createRegionFactory(getRegionAttributes());
      regionFactory.setStatisticsEnabled(true);
      ExpirationAttributes expire = new ExpirationAttributes(timeout, ExpirationAction.DESTROY);
      regionFactory.setEntryIdleTimeout(expire);
      LocalRegion region = (LocalRegion) createRegion(name, regionFactory);
      if (region.getDataPolicy().withPartitioning()) {
        // Force all buckets to be created locally so the
        // test will know that the create happens in this vm
        // and the update (in vm1) is remote.
        PartitionRegionHelper.assignBucketsToPartitions(region);
      }
      region.create(key, null);
      EntryExpiryTask eet = region.getEntryExpiryTask(key);
      region.create("createExpiryTime", eet.getExpirationTime());
      Wait.waitForExpiryClockToChange(region);
    });

    vm1.invoke("Create Region " + name, () -> {
      AttributesFactory<?, ?> regionFactory = new AttributesFactory<>(getRegionAttributes());
      regionFactory.setStatisticsEnabled(true);
      ExpirationAttributes expire = new ExpirationAttributes(timeout, ExpirationAction.DESTROY);
      regionFactory.setEntryIdleTimeout(expire);
      if (getRegionAttributes().getPartitionAttributes() != null) {
        createRegion(name, regionFactory.create());
      } else {
        createRegion(name);
      }
    });

    vm1.invoke("Update entry", () -> {
      final Region<Object, Object> r = getRootRegion().getSubregion(name);
      assertThat(r).isNotNull();
      r.put(key, value);
    });

    vm0.invoke("Verify reset", () -> {
      final LocalRegion region = (LocalRegion) getRootRegion().getSubregion(name);

      // wait for update to reach us from vm1 (needed if no-ack)
      await("never saw key " + key + "equal to value " + value)
          .until(() -> value.equals(region.get(key)));

      EntryExpiryTask eet = region.getEntryExpiryTask(key);
      long createExpiryTime = (Long) region.get("createExpiryTime");
      long updateExpiryTime = eet.getExpirationTime();
      if (updateExpiryTime - createExpiryTime <= 0L) {
        fail("update did not reset the expiration time. createExpiryTime=" + createExpiryTime
            + " updateExpiryTime=" + updateExpiryTime);
      }
    });
  }
Tests to makes sure that a distributed update resets the expiration timer.
geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java