@Test
  public void testDestroy() {
    DiskRegionStats diskStats = diskRegion.getStats();
    EvictionCounters lruStats = getLRUStats(region);

    IntStream.range(0, MAX_ENTRIES + 1).forEach((i) -> region.put(i, "value"));
    assertEquals(0, diskStats.getRemoves());
    assertEquals(1, lruStats.getEvictions());

    // Destroying entries in memory should have no effect on the disk
    IntStream.range(1, MAX_ENTRIES + 1).forEach(region::destroy);
    assertEquals(0, diskStats.getRemoves());
    assertEquals(1, lruStats.getEvictions());

    // Destroying entry overflowed to disk should cause remove on disk
    region.destroy(0);
    assertEquals(1, diskStats.getRemoves());
    assertEquals(1, lruStats.getEvictions());
    assertEquals(0, region.keySet().size());
  }
Tests destroying entries in an overflow region
geode-core/src/integrationTest/java/org/apache/geode/cache30/DiskRegionIntegrationTest.java