@Test
  public void testNoLoaderWithInvalidEntry() {
    assumeThat(supportsNetLoad()).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 {
            return value;
          }
        });
        region.getAttributesMutator().setCacheLoader(loader());
      }
    };

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

    vm1.invoke("Create invalid entry", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      region.create(key, null);
    });

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

    vm1.invoke("Verify loader", () -> {
      assertThat(loader().wasInvoked()).isFalse();
    });
  }
Tests that a remote <code>CacheLoader</code> is not invoked if the remote region has an invalid
entry (that is, a key, but no value).
geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java