@Test
  public void testRemoteFetch() throws CacheException {
    assertThat(getRegionAttributes().getScope().isDistributed()).isTrue();

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

    SerializableRunnable create = new CacheSerializableRunnable() {
      @Override
      public void run2() throws CacheException {
        Region<Object, Object> region = createRegion(name);
        setLoader(new TestCacheLoader<Object, Object>() {
          @Override
          public Object load2(LoaderHelper<Object, Object> helper) throws CacheLoaderException {

            fail("Should not be invoked");
            return null;
          }
        });
        region.getAttributesMutator().setCacheLoader(loader());
      }
    };

    vm0.invoke("Create Region", create);
    vm0.invoke("Put", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      region.put(key, value);
      assertThat(loader().wasInvoked()).isFalse();
    });

    vm1.invoke("Create Region", create);

    vm1.invoke("Get", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      assertThat(value).isEqualTo(region.get(key));
      assertThat(loader().wasInvoked()).isFalse();
    });
  }
Tests that a value in a remote cache will be fetched by <code>netSearch</code> and that no
loaders are invoked.
geode-core/src/distributedTest/java/org/apache/geode/cache30/GlobalRegionDUnitTest.java