private void validatePutAndCreateInDatastore(final VM vm2) {
    vm2.invoke(() -> {
      Cache cache = getCache();
      Region<String, String> region = cache.getRegion(regionName);

      // put
      for (int i = putRange_3Start; i <= putRange_3End; i++) {
        String key = Integer.toString(i);
        String value = Integer.toString(i);

        region.put(key, value);
      }

      // create
      for (int i = createRange_3Start; i <= createRange_3End; i++) {
        String key = Integer.toString(i);
        String value = i % 2 == 0 ? Integer.toString(i) : null;

        region.create(key, value);
      }

      // create throws EntryExistsException
      try (IgnoredException ignored1 = addIgnoredException(EntryExistsException.class.getName());
          IgnoredException ignored2 = addIgnoredException(ReplyException.class.getName())) {
        for (int i = createRange_3Start; i <= createRange_3End; i++) {
          String key = Integer.toString(i);
          String value = i % 2 == 0 ? Integer.toString(i) : null;

          assertThatThrownBy(() -> region.create(key, value))
              .isInstanceOf(EntryExistsException.class);
        }
      }
    });
  }
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