private static void setupRegions(String regionName, String parRegionName) {
    InternalCache cache = ClusterStartupRule.getCache();
    RegionFactory<Object, Object> regionFactory =
        cache.createRegionFactory(RegionShortcut.REPLICATE);

    Region<Object, Object> dataRegion = regionFactory.create(DATA_REGION_NAME);
    dataRegion = regionFactory.createSubregion(dataRegion, DATA_REGION_NAME_CHILD_1);
    regionFactory.createSubregion(dataRegion, DATA_REGION_NAME_CHILD_1_2);

    regionFactory.create(regionName);

    PartitionAttributes<Object, Object> partitionAttrs =
        new PartitionAttributesFactory<>().setRedundantCopies(2).create();
    RegionFactory<Object, Object> partitionRegionFactory =
        cache.createRegionFactory(RegionShortcut.PARTITION);
    partitionRegionFactory.setPartitionAttributes(partitionAttrs);
    partitionRegionFactory.create(DATA_PAR_REGION_NAME);
    partitionRegionFactory.create(parRegionName);
  }
Dunit class for testing gemfire data commands : get, put, remove
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/GeodeDataCommandsDistributedTestBase.java