@Test
  public void testBackup() {
    region = cache.<Integer, String>createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT)
        .setScope(Scope.LOCAL).setDiskSynchronous(true)
        .setEvictionAttributes(
            EvictionAttributes.createLRUEntryAttributes(100, EvictionAction.OVERFLOW_TO_DISK))
        .setDiskStoreName(diskStore.getName()).create(REGION_NAME + 2);
    diskRegion = ((InternalRegion) region).getDiskRegion();

    region.put(0, "destroyed");
    region.localDestroy(0);


    // test invalidate
    region.put(1, "invalidated");
    region.invalidate(1);
    assertTrue(region.containsKey(1) && !region.containsValueForKey(1));

    // test local-invalidate
    region.put(2, "localInvalidate");
    region.localInvalidate(2);
    assertTrue(region.containsKey(2) && !region.containsValueForKey(2));

    // test modification
    region.put(3, "originalValue");
    region.put(3, "modified");
    assertEquals("modified", region.get(3));
    assertEquals(3, region.keySet().size());

    cache.close();
    cache = new CacheFactory().create();
    DiskStoreFactory dsf = cache.createDiskStoreFactory();
    dsf.setDiskDirs(new File[] {diskDir});
    diskStore = dsf.create(REGION_NAME);

    region = cache.<Integer, String>createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT)
        .setScope(Scope.LOCAL).setDiskSynchronous(true)
        .setEvictionAttributes(
            EvictionAttributes.createLRUEntryAttributes(100, EvictionAction.OVERFLOW_TO_DISK))
        .setDiskStoreName(diskStore.getName()).create(REGION_NAME + 2);

    assertEquals(3, region.keySet().size());
    assertTrue(region.containsKey(1) && !region.containsValueForKey(1));
    assertTrue(region.containsKey(2) && !region.containsValueForKey(2));
    assertEquals("modified", region.get(3));
  }
Tests that the disk region statistics are updated correctly for persist backup regions.
geode-core/src/integrationTest/java/org/apache/geode/cache30/DiskRegionIntegrationTest.java