@Test
  public void testMirroredLocalLoad() {
    assumeThat(supportsReplication()).isTrue();

    final String name = getUniqueName();
    final Object key = "KEY";
    final Object value = "VALUE";

    vm0.invoke("Create region with loader", () -> {
      RegionFactory<Object, Object> regionFactory =
          getBasicRegionFactory(new TestCacheLoader<Object, Object>() {
            @Override
            public Object load2(LoaderHelper<Object, Object> helper) throws CacheLoaderException {
              return value;
            }
          });
      createRegion(name, regionFactory);
    });

    vm2.invoke("Create region with bad loader", () -> {
      setLoader(new TestCacheLoader<Object, Object>() {
        @Override
        public Object load2(LoaderHelper<Object, Object> helper) throws CacheLoaderException {

          fail("Should not be invoked");
          return null;
        }
      });
      RegionFactory<Object, Object> regionFactory = getBasicRegionFactory(loader());
      createRegion(name, regionFactory);
    });

    vm0.invoke("Get", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      assertThat(region.get(key)).isEqualTo(value);
    });

    vm2.invoke("Verify no load", () -> {
      assertThat(loader().wasInvoked()).isFalse();
    });
  }
Tests that a local load occurs, even with mirroring
geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java