@Test
  public void testRemoveCorrectlyRecorded() {
    DiskRegionProperties diskRegionProperties = new DiskRegionProperties();
    diskRegionProperties.setOverflow(true);
    diskRegionProperties.setOverFlowCapacity(1);
    diskRegionProperties.setDiskDirs(diskDirs);

    DiskStoreFactory diskStoreFactory = toDiskStoreFactory(diskRegionProperties);

    createDiskStoreWithSizeInBytes(diskStoreName, diskStoreFactory);

    Region<String, String> region =
        createRegion(regionName, diskStoreName, true, true, false, true, 1);

    region.put("1", "1");
    region.put("2", "2");
    region.put("3", "3");

    AfterDestroyListener<String, String> cacheListener = new AfterDestroyListener<>();
    region.getAttributesMutator().addCacheListener(cacheListener);

    region.destroy("1");

    // Make sure we don't get an old value when doing a destroy of an entry that overflowed to disk.
    // If we do then we have hit bug 40795.
    assertThat(cacheListener.getLastEvent()).isNotNull();
    assertThat(cacheListener.getLastEvent().getOldValue()).isNull();

    assertThat(region.get("1")).isNull();

    // does the following ever throw EntryNotFoundException? that would be ok
    Object valueOnDisk = ((InternalRegion) region).getValueOnDisk("1");
    assertThat(valueOnDisk == null || valueOnDisk.equals(Token.TOMBSTONE)).isTrue();

    region.close();

    Region<String, String> region2 =
        createRegion(regionName, diskStoreName, true, true, false, true, 1);
    assertThat(region2.get("1")).isNull();
  }
Integration tests covering some miscellaneous functionality of Disk Region.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionJUnitTest.java