void assertRegionStateInRemoteMember(final Cache cache, final String regionName) {
      if (expirationAction().isInvalidate()) {
        // distributed invalidate region
        Region<String, String> region = cache.getRegion(regionName);
        await().untilAsserted(() -> {
          assertThat(region.containsKey(KEY)).isTrue();
          assertThat(region.containsValueForKey(KEY)).isFalse();
        });

      } else if (expirationAction().isDestroy()) {
        // verify region was destroyed (or is in process of being destroyed)
        await().until(() -> isDestroyed(cache.getRegion(regionName)));

      } else {
        // for LOCAL_DESTROY or LOCAL_INVALIDATE, the value should be present
        Region<String, String> region = cache.getRegion(regionName);
        await().untilAsserted(() -> {
          assertThat(region.containsValueForKey(KEY)).isTrue();
          assertThat(region.get(KEY)).isEqualTo(VALUE);
        });
      }
    }
Test Region expiration - both time-to-live and idle timeout.

<p>
Note: See LocalRegionTest and MultiVMRegionTestCase for more expiration tests.

<p>
Single-JVM tests were extracted to RegionExpirationIntegrationTest.

@since GemFire 3.0
geode-core/src/distributedTest/java/org/apache/geode/cache/RegionExpirationDistributedTest.java