private Region<Integer, Integer> createRegion(RegionShortcut shortcut) {
    Cache cache = cacheRule.getOrCreateCache();

    DiskStoreFactory diskStoreFactory = cache.createDiskStoreFactory();
    diskStoreFactory.setDiskDirs(new File[] {getDiskDir()});

    DiskStore diskStore = diskStoreFactory.create(getUniqueName());

    RegionFactory<Integer, Integer> regionFactory = cache.createRegionFactory(shortcut);
    regionFactory.setDiskStoreName(diskStore.getName());
    regionFactory.setDiskSynchronous(true);

    if (shortcut.equals(PARTITION_PERSISTENT)) {
      PartitionAttributesFactory partitionAttributesFactory = new PartitionAttributesFactory();
      partitionAttributesFactory.setTotalNumBuckets(1);
      regionFactory.setPartitionAttributes(partitionAttributesFactory.create());
    }

    return regionFactory.create(regionName);
  }
Create a region, installing the test hook in the backup lock

@param shortcut The region shortcut to use to create the region
@return The newly created region.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/backup/PrepareAndFinishBackupDistributedTest.java