@Test
  public void testMultipleRegions() throws InterruptedException {
    Region region = createRegion();
    Region region2 = createRegion("region2");

    putEntries(region, 0, 50, "A");
    putEntries(region2, 0, 50, "A");

    cache.close();

    cache = createCache();

    final CountDownLatch suspendRecovery = new CountDownLatch(1);
    final CountDownLatch recoveryDone = new CountDownLatch(1);
    DiskStoreObserver.setInstance(new DiskStoreObserver() {

      @Override
      public void beforeAsyncValueRecovery(DiskStoreImpl store) {
        try {
          suspendRecovery.await();
        } catch (InterruptedException e) {
          fail("interrupted");
        }
      }

      @Override
      public void afterAsyncValueRecovery(DiskStoreImpl store) {
        recoveryDone.countDown();
      }
    });
    try {
      region = createRegion();
      region2 = createRegion("region2");

      checkEntriesInMemory(region, 0, 50, "A", false);
      checkEntries(region, 0, 40, "A");

      putEntries(region, 0, 10, "B");
      invalidateEntries(region, 10, 20);
      removeEntries(region, 20, 30);

      checkEntriesInMemory(region2, 0, 50, "A", false);
      checkEntries(region2, 0, 40, "A");

      putEntries(region2, 0, 10, "B");
      invalidateEntries(region2, 10, 20);
      removeEntries(region2, 20, 30);

      suspendRecovery.countDown();
      recoveryDone.await();

      checkEntriesInMemory(region, 0, 10, "B", true);
      checkEntriesInMemory(region, 10, 20, Token.INVALID, true);
      checkEntries(region, 10, 20, null);
      checkEntries(region, 20, 30, null);
      checkEntriesInMemory(region, 30, 50, "A", true);

      checkEntriesInMemory(region2, 0, 10, "B", true);
      checkEntriesInMemory(region2, 10, 20, Token.INVALID, true);
      checkEntries(region2, 10, 20, null);
      checkEntries(region2, 20, 30, null);
      checkEntriesInMemory(region2, 30, 50, "A", true);
    } finally {
      suspendRecovery.countDown();
    }
  }
Test to make sure that we create missing krfs when we restart the system.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionAsyncRecoveryJUnitTest.java