@Test
  @Parameters({"true", "false"})
  public void testEntryDestroyWithCacheClose(boolean offheap) throws Exception {
    RegionMapDestroy.testHookRunnableForConcurrentOperation = () -> cache.close();

    Region<Object, Object> region = createRegion(offheap);
    region.put(KEY, VALUE);

    assertThatThrownBy(() -> region.destroy(KEY)).isInstanceOf(CacheClosedException.class);
  }
TestCase that emulates the conditions that entry destroy with concurrent destroy region or cache
close event will get expected Exception.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/map/DestroyEntryDuringCloseIntegrationTest.java