@Before
  public void setup() throws IOException {
    cache = new CacheFactory().create();
    diskDir = tempDir.newFolder();

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

    region =
        cache.<Integer, String>createRegionFactory(RegionShortcut.LOCAL).setDiskSynchronous(true)
            .setDiskStoreName(diskStore.getName()).setEvictionAttributes(EvictionAttributes
                .createLRUEntryAttributes(MAX_ENTRIES, EvictionAction.OVERFLOW_TO_DISK))
            .create(REGION_NAME);
    diskRegion = ((InternalRegion) region).getDiskRegion();
  }
Tests the functionality of cache regions whose contents may be written to disk.


@since GemFire 3.2
geode-core/src/integrationTest/java/org/apache/geode/cache30/DiskRegionIntegrationTest.java