@Test
  public void testLocalUpdateModifiedCallbackArgument() throws CacheException {

    final String name = getUniqueName();
    final Object key = "KEY";
    final Object value = "VALUE";
    final Object one = "ONE";
    final Object two = "TWO";

    TestCacheLoader loader = new TestCacheLoader() {
      @Override
      public Object load2(LoaderHelper helper) throws CacheLoaderException {

        Object[] array = (Object[]) helper.getArgument();
        assertEquals(one, array[0]);
        array[0] = two;

        return value;
      }
    };

    TestCacheWriter writer = new TestCacheWriter() {
      @Override
      public void beforeCreate2(EntryEvent event) throws CacheWriterException {

      }

      @Override
      public void beforeUpdate2(EntryEvent event) throws CacheWriterException {

        Object[] array = (Object[]) event.getCallbackArgument();
        assertEquals(two, array[0]);
      }
    };

    AttributesFactory factory = new AttributesFactory(getRegionAttributes());
    factory.setCacheLoader(loader);
    factory.setCacheWriter(writer);
    Region region = createRegion(name, factory.create());

    region.create(key, null);
    assertFalse(loader.wasInvoked());
    assertTrue(writer.wasInvoked());

    Object[] array = new Object[] {one};
    assertEquals(value, region.get(key, array));
    assertTrue(loader.wasInvoked());
    assertTrue(writer.wasInvoked());
  }
Tests that a local writer receives a modified version of the callback argument on an update.
geode-core/src/distributedTest/java/org/apache/geode/cache30/LocalRegionDUnitTest.java