@Test
  public void testGetBeforeFlush() {
    DiskRegionProperties diskRegionProperties = new DiskRegionProperties();
    diskRegionProperties.setBytesThreshold(100000000L);
    diskRegionProperties.setTimeInterval(100000000L);
    diskRegionProperties.setDiskDirs(dirs);
    diskRegionProperties.setRolling(true);
    region = DiskRegionHelperFactory.getAsyncPersistOnlyRegion(cache, diskRegionProperties);
    LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = true;
    getBeforeFlush(region);
    region.destroyRegion();
  }
A region close is done after flush is over. The close is done in a separate thread and a 3000
ms wait is put to ensure that the separate thread has closed the region
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ConcurrentFlushingAndRegionOperationsJUnitTest.java