void delBeforeRoll(final Region region) {
    CacheObserverHolder.setInstance(new CacheObserverAdapter() {

      @Override
      public void beforeGoingToCompact() {
        synchronized (region) {
          region.notify();
          hasBeenNotified = true;
        }
      }
    });
    region.put("Key", "Value1");
    switchOplog(region);
    synchronized (region) {
      if (!hasBeenNotified) {
        try {
          region.wait(10000);
          assertTrue(hasBeenNotified);
        } catch (InterruptedException e) {
          throw new AssertionError("exception not expected here", e);
        }
      }
    }
    try {
      region.destroy("Key");
    } catch (Exception e) {
      logWriter.error("Exception occurred", e);
      throw new AssertionError("failed while trying to destroy due to ", e);
    }
    boolean entryNotFound = false;
    try {
      getValueOnDisk(region);
    } catch (EntryNotFoundException e) {
      entryNotFound = true;
    }
    if (!entryNotFound) {
      fail("EntryNotFoundException was expected but did not get it");
    }
    entryNotFound = false;
    Object obj = ((LocalRegion) region).basicGetEntry("Key");
    if (obj == null) {
      entryNotFound = true;
    }
    if (!entryNotFound) {
      fail("EntryNotFoundException was expected but did not get it");
    }
  }
This JUnit test tests concurrent rolling and normal region operations put,get,clear,destroy in
both sync and async mode

A region operation is done on the same key that is about to be rolled or has just been rolled and
the region operation is verified to have been correctly executed.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ConcurrentRollingAndRegionOperationsJUnitTest.java