@Before
  public void setUp() {
    String diskStoreName = getClass().getSimpleName() + "_diskStore";
    String regionName = getClass().getSimpleName() + "_region";

    Properties config = new Properties();
    config.setProperty(MCAST_PORT, "0");
    config.setProperty(LOCATORS, "");

    File diskDir = temporaryFolder.getRoot();

    cache = new CacheFactory(config).create();

    cache.createDiskStoreFactory().setMaxOplogSize(1).setDiskDirs(new File[] {diskDir})
        .create(diskStoreName);

    region = cache.createRegionFactory(REPLICATE_PERSISTENT).setDiskStoreName(diskStoreName)
        .create(regionName);
  }
Test of interrupting threads doing disk writes to see the effect.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/InterruptDiskJUnitTest.java