@Test
  public void testDistributedPut() {
    final String rgnName = getUniqueName();

    SerializableRunnable newKey = new SerializableRunnable() {
      @Override
      public void run() {
        try {
          if (!getRegionAttributes().getDataPolicy().withReplication()
              && getRegionAttributes().getPartitionAttributes() == null) {
            Region<?, ?> root = getRootRegion("root");
            Region<Object, Object> rgn = root.getSubregion(rgnName);
            rgn.create("key", null);
            getSystem().getLogWriter().info("testDistributedPut: Created Key");
          }
        } catch (CacheException e) {
          fail("While creating region", e);
        }
      }
    };

    vm0.invoke("testDistributedPut: Create Region", () -> {
      createRegion(rgnName);
    });
    vm0.invoke("testDistributedPut: Create Key", newKey);
    int vmCount = VM.getVMCount();

    for (int i = 1; i < vmCount; i++) {
      VM vm = VM.getVM(i);
      vm.invoke("testDistributedPut: Create Region", () -> {
        createRegion(rgnName);
      });
      if (!getRegionAttributes().getDataPolicy().withPreloaded()) {
        vm.invoke("testDistributedPut: Create Key", newKey);
      }
    }

    try {
      Region<String, String> rgn = createRegion(rgnName);

      rgn.put("key", "value");
      getSystem().getLogWriter().info("testDistributedPut: Put Value");

      invokeInEveryVM("testDistributedPut: Verify Received Value", repeatingIfNecessary(() -> {
        Region<String, String> rgn1 = getRootRegion().getSubregion(rgnName);
        String description = "Could not find entry for 'key'";
        Object actual = rgn1.getEntry("key");
        assertThat(actual).describedAs(description).isNotNull();
        assertThat(rgn1.getEntry("key").getValue()).isEqualTo("value");
      }));

    } catch (Exception e) {
      getCache().close();
      getSystem().getLogWriter().fine("testDistributedPut: Caused exception in createRegion");
      throw e;
    }

  }
Tests that an entry update is propagated to other caches that have that same entry defined.
geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java