@Test
  public void testPoolAndLoader() throws Exception {
    final String regionName = getName();
    final Host host = Host.getHost(0);
    VM server = host.getVM(0);
    VM client = host.getVM(1);

    final int serverPort = getRandomAvailableTCPPort();
    server.invoke(new SerializableCallable() {
      @Override
      public Object call() throws IOException {
        Cache cache = getCache();
        AttributesFactory af = new AttributesFactory();
        RegionAttributes attrs = af.create();
        cache.createRegion(regionName, attrs);

        startBridgeServer(serverPort, true);
        return null;
      }
    });

    client.invoke(new SerializableCallable() {
      @Override
      public Object call() {
        Cache cache = getCache();
        PoolFactory factory = PoolManager.createFactory();
        factory.addServer(NetworkUtils.getServerHostName(host), serverPort);
        factory.create("pool1");

        AttributesFactory af = new AttributesFactory();
        af.setDataPolicy(DataPolicy.DEFAULT);
        af.setScope(Scope.LOCAL);
        af.setPoolName("pool1");
        af.setCacheLoader(new MyCacheLoader("loaded"));
        RegionAttributes attrs = af.create();
        cache.createRegion(regionName, attrs);

        return null;
      }
    });

    client.invoke(new SerializableRunnable() {
      @Override
      public void run() {
        Region region = getRootRegion(regionName);
        region.put("a", "put-a");
        region.put("b", "put-b");
        assertEquals("loaded-c", region.get("c"));
        assertEquals("loaded-d", region.get("d"));
      }
    });

    server.invoke(new SerializableRunnable() {
      @Override
      public void run() {
        Region region = getRootRegion(regionName);
        assertEquals("put-a", region.get("a"));
        assertEquals("put-b", region.get("b"));
        assertEquals("loaded-c", region.get("c"));
        assertEquals("loaded-d", region.get("d"));
        region.put("e", "server-e");
      }
    });

    client.invoke(new SerializableRunnable() {
      @Override
      public void run() {
        Region region = getRootRegion(regionName);
        assertEquals("put-a", region.get("a"));
        assertEquals("put-b", region.get("b"));
        assertEquals("loaded-c", region.get("c"));
        assertEquals("loaded-d", region.get("d"));
        assertEquals("server-e", region.get("e"));
      }
    });
  }
Tests that we can have both a connection pool and a bridge loader. The expected order of
operations for get is. get from server load from loader.

Anything that is loaded on the client is put on the server..
geode-core/src/distributedTest/java/org/apache/geode/cache/ConnectionPoolAndLoaderDUnitTest.java