private void distributedOps(DataPolicy dp, InterestPolicy ip) throws CacheException {
    initOtherId();
    AttributesFactory af = new AttributesFactory();
    af.setDataPolicy(dp);
    af.setSubscriptionAttributes(new SubscriptionAttributes(ip));
    af.setScope(Scope.DISTRIBUTED_ACK);
    Region r = createRootRegion("ProxyDUnitTest", af.create());

    doCreateOtherVm();

    r.put("putkey", "putvalue1");

    getOtherVm().invoke(new CacheSerializableRunnable("check put") {
      @Override
      public void run2() throws CacheException {
        Region r = getRootRegion("ProxyDUnitTest");
        assertEquals(true, r.containsKey("putkey"));
        assertEquals("putvalue1", r.getEntry("putkey").getValue());
        r.put("putkey", "putvalue2");
      }
    });

    assertEquals(false, r.containsKey("putkey"));
    assertEquals("putvalue2", r.get("putkey")); // netsearch

    r.invalidate("putkey");

    getOtherVm().invoke(new CacheSerializableRunnable("check invalidate") {
      @Override
      public void run2() throws CacheException {
        Region r = getRootRegion("ProxyDUnitTest");
        assertEquals(true, r.containsKey("putkey"));
        assertEquals(null, r.getEntry("putkey").getValue());
      }
    });
    assertEquals(null, r.get("putkey")); // invalid so total miss

    r.destroy("putkey");

    getOtherVm().invoke(new CacheSerializableRunnable("check destroy") {
      @Override
      public void run2() throws CacheException {
        Region r = getRootRegion("ProxyDUnitTest");
        assertEquals(false, r.containsKey("putkey"));
      }
    });

    assertEquals(null, r.get("putkey")); // total miss

    r.create("createKey", "createValue1");
    getOtherVm().invoke(new CacheSerializableRunnable("check create") {
      @Override
      public void run2() throws CacheException {
        Region r = getRootRegion("ProxyDUnitTest");
        assertEquals(true, r.containsKey("createKey"));
        assertEquals("createValue1", r.getEntry("createKey").getValue());
      }
    });
    {
      Map m = new HashMap();
      m.put("putAllKey1", "putAllValue1");
      m.put("putAllKey2", "putAllValue2");
      r.putAll(m, "putAllCallback");
    }
    getOtherVm().invoke(new CacheSerializableRunnable("check putAll") {
      @Override
      public void run2() throws CacheException {
        Region r = getRootRegion("ProxyDUnitTest");
        assertEquals(true, r.containsKey("putAllKey1"));
        assertEquals("putAllValue1", r.getEntry("putAllKey1").getValue());
        assertEquals(true, r.containsKey("putAllKey2"));
        assertEquals("putAllValue2", r.getEntry("putAllKey2").getValue());
      }
    });
    r.clear();
    getOtherVm().invoke(new CacheSerializableRunnable("check clear") {
      @Override
      public void run2() throws CacheException {
        Region r = getRootRegion("ProxyDUnitTest");
        assertEquals(0, r.size());
      }
    });

    getOtherVm().invoke(new CacheSerializableRunnable("install CacheWriter") {
      @Override
      public void run2() throws CacheException {
        Region r = getRootRegion("ProxyDUnitTest");
        AttributesMutator am = r.getAttributesMutator();
        CacheWriter cw = new CacheWriterAdapter() {
          @Override
          public void beforeCreate(EntryEvent event) throws CacheWriterException {
            throw new CacheWriterException("expected");
          }
        };
        am.setCacheWriter(cw);
      }
    });
    try {
      r.put("putkey", "putvalue");
      fail("expected CacheWriterException");
    } catch (CacheWriterException ignored) {
    }
    getOtherVm().invoke(new CacheSerializableRunnable("check clear") {
      @Override
      public void run2() throws CacheException {
        Region r = getRootRegion("ProxyDUnitTest");
        assertEquals(0, r.size());
      }
    });

    assertEquals(null, r.get("loadkey")); // total miss
    getOtherVm().invoke(new CacheSerializableRunnable("install CacheLoader") {
      @Override
      public void run2() throws CacheException {
        Region r = getRootRegion("ProxyDUnitTest");
        AttributesMutator am = r.getAttributesMutator();
        am.setCacheWriter(null); // clear csche writer
        CacheLoader cl = new CacheLoader() {
          @Override
          public Object load(LoaderHelper helper) throws CacheLoaderException {
            if (helper.getKey().equals("loadkey")) {
              return "loadvalue";
            } else if (helper.getKey().equals("loadexception")) {
              throw new CacheLoaderException("expected");
            } else {
              return null;
            }
          }

          @Override
          public void close() {}
        };
        am.setCacheLoader(cl);
      }
    });
    assertEquals("loadvalue", r.get("loadkey")); // net load
    assertEquals(null, r.get("foobar")); // total miss
    try {
      r.get("loadexception");
      fail("expected CacheLoaderException");
    } catch (CacheLoaderException ignored) {
    }
    r.destroyRegion();
    getOtherVm().invoke(new CacheSerializableRunnable("check clear") {
      @Override
      public void run2() throws CacheException {
        Region r = getRootRegion("ProxyDUnitTest");
        assertEquals(null, r);
      }
    });
  }
check distributed ops that originate in a PROXY are correctly distributed to non-proxy regions.
geode-core/src/distributedTest/java/org/apache/geode/cache30/ProxyDUnitTest.java