@Test
  public void testSimplePdxInstancePut() {
    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    VM vm2 = host.getVM(2);

    int port = vm0.invoke(() -> createServerRegion(SimpleClass.class));
    createClientRegion(vm1, port);
    createClientRegion(vm2, port);

    vm1.invoke(() -> {
      Region r = getRootRegion("testSimplePdx");
      r.put(1, new SimpleClass(57, (byte) 3));
      return null;
    });
    final SerializableCallable checkValue = new SerializableCallable() {
      @Override
      public Object call() throws Exception {
        Region r = getRootRegion("testSimplePdx");
        Boolean previousPdxReadSerializedFlag = cache.getPdxReadSerializedOverride();
        cache.setPdxReadSerializedOverride(true);
        try {
          Object v = r.get(1);
          if (!(v instanceof PdxInstance)) {
            fail("expected v " + v.getClass() + " to be a PdxInstance");
          }
          PdxInstance piv = (PdxInstance) v;
          assertEquals(new SimpleClass(57, (byte) 3), piv.getObject());
          Object v2 = r.get(1);
          if (v == v2) {
            fail("expected v and v2 to have a different identity");
          }
          assertEquals(v, v2);
        } finally {
          cache.setPdxReadSerializedOverride(previousPdxReadSerializedFlag);
        }
        return null;
      }
    };
    vm2.invoke(checkValue);

    vm0.invoke(checkValue);

  }
Test that we through an exception if one of the servers has persistent regions but not a
persistent registry.
geode-core/src/distributedTest/java/org/apache/geode/pdx/PdxClientServerDUnitTest.java