@Test
  public void testRemoteCacheLoaderArg() {
    assumeThat(supportsNetLoad()).isTrue();

    assertThat(getRegionAttributes().getScope().isDistributed()).isTrue();

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

    vm0.invoke("Create Region", () -> {
      createRegion(name);
    });
    vm1.invoke("Create Region", () -> {
      createRegion(name);
    });

    vm1.invoke("Set CacheLoader", () -> {
      final Region<Object, Object> region = getRootRegion().getSubregion(name);
      setLoader(new TestCacheLoader<Object, Object>() {
        @Override
        public Object load2(LoaderHelper<Object, Object> helper) throws CacheLoaderException {
          assertThat(helper.getRegion()).isEqualTo(region);
          assertThat(helper.getKey()).isEqualTo(key);
          assertThat(helper.getArgument()).isEqualTo(arg);

          return value;
        }
      });
      region.getAttributesMutator().setCacheLoader(loader());
      flushIfNecessary(region);
    });

    vm0.invoke("Remote load", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);

      try {
        // Use a non-serializable arg object
        region.get(key, new Object() {});
        fail("Should have thrown an IllegalArgumentException");

      } catch (IllegalArgumentException ex) {
        // pass...
      }
      assertThat(region.getEntry(key)).isNull();
      try {
        assertThat(region.get(key, arg)).isEqualTo(value);
      } catch (IllegalArgumentException ignored) {
      }
    });

    vm1.invoke("Verify loader", () -> {
      assertThat(loader().wasInvoked()).isTrue();
    });
  }
Tests that the parameter passed to a remote {@link CacheLoader} is actually passed.
geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java