@Override
      public void beforeGoingToCompact() {
        final Object obj = new Object();
        Thread thread1 = new Thread() {

          @Override
          public void run() {
            RegionEntry re = ((LocalRegion) region).basicGetEntry("Key");

            synchronized (re) {
              synchronized (obj) {
                obj.notify();
                localHasBeenNotified = true;
              }
              try {
                Thread.sleep(2000);
              } catch (InterruptedException e) {
                testFailed = true;
                failureCause = "Exception occurred when it was not supposed to occur, Exception is "
                    + e + "in concurrentPutAndRoll";
                throw new AssertionError("exception not expected here", e);
              }
            }
          }
        };
        thread1.start();
        synchronized (obj) {
          try {
            if (!localHasBeenNotified) {
              obj.wait(10000);
              assertTrue(localHasBeenNotified);
            }
          } catch (InterruptedException e) {
            testFailed = true;
            failureCause = "Exception occurred when it was not supposed to occur, Exception is " + e
                + "in concurrentPutAndRoll";
            throw new AssertionError("exception not expected here", e);
          }
        }
        startTime = System.currentTimeMillis();
      }
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