@Test
  public void testNoRegionKeepAlive() {
    final String name = getUniqueName();
    final Object key = "KEEP_ALIVE_KEY";
    final Object value = "VALUE";

    vm0.invoke("Create region", () -> {
      createRegion(name);
    });

    vm0.invoke("Populate region", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      region.put(key, value);
      assertThat(region.get(key)).isEqualTo(value);
    });
    vm0.invoke("Close cache", JUnit4CacheTestCase::closeCache);

    vm0.invoke("Re-create cache", () -> {
      Region<Object, Object> region = createRegion(name);
      // if this is a backup region, then it will find the data
      // otherwise it should not
      if (region.getAttributes().getDataPolicy().withPersistence()) {
        assertThat(region.get(key)).isEqualTo(value);
      } else {
        assertThat(region.get(key)).isNull();
      }
    });
  }
Tests that a region is not kept alive
geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java