private void createPartitionedRegionWithCacheLoader() {
    Cache cache = getCache();

    CacheLoader<String, String> cacheLoader = new TestCacheLoader() {
      @Override
      public Object load2(final LoaderHelper helper) throws CacheLoaderException {
        assertThat(helper).isNotNull();
        assertThat(helper.getKey()).isEqualTo(key1);
        assertThat(helper.getRegion().getName()).isEqualTo(regionName);
        assertThat(helper.getArgument()).isEqualTo(cacheLoaderArg);
        return helper.getArgument();
      }
    };

    PartitionAttributesFactory<String, String> partitionAttributesFactory =
        new PartitionAttributesFactory<>();
    partitionAttributesFactory.setLocalMaxMemory(localMaxMemory);
    partitionAttributesFactory.setRedundantCopies(1);

    RegionFactory<String, String> regionFactory = cache.createRegionFactory(PARTITION);
    regionFactory.setCacheLoader(cacheLoader);
    regionFactory.setPartitionAttributes(partitionAttributesFactory.create());

    PartitionedRegion partitionedRegion = (PartitionedRegion) regionFactory.create(regionName);

    assertThat(partitionedRegion.getDataStore().getCacheLoader()).isSameAs(cacheLoader);
  }
This is a PartitionedRegion test for scope = D_ACK. 4 VMs are used to create the PR with and
without(Only Accessor) the DataStore.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionAPIDUnitTest.java