@Test
  public void testEventIdOutOfOrderInPartitionRegionSingleHop() {
    VM server3 = client2;

    int serverPort1 = server1.invoke(() -> new ServerBuilder()
        .regionShortcut(PARTITION)
        .create());
    int serverPort2 = server2.invoke(() -> new ServerBuilder()
        .regionShortcut(PARTITION)
        .create());
    int serverPort3 = server3.invoke(() -> new ServerBuilder()
        .regionShortcut(PARTITION)
        .create());

    client1.invoke(() -> new ClientBuilder()
        .serverPorts(serverPort1, serverPort2, serverPort3)
        .subscriptionAckInterval()
        .subscriptionEnabled(true)
        .subscriptionRedundancy()
        .create());

    // do some putAll to get ClientMetaData for future putAll
    client1.invoke(() -> {
      // register interest and add listener
      Region<String, TickerData> region = getClientCache().getRegion(regionName);
      doPutAll(getClientCache().getRegion(regionName), "key-", ONE_HUNDRED);

      COUNTER.set(new Counter("client1"));
      region.getAttributesMutator()
          .addCacheListener(new CountingCacheListener<>(COUNTER.get()));
      region.registerInterest("ALL_KEYS");
    });

    // server1 and server2 will closeCache after created 10 keys
    // server1 add slow listener
    server1.invoke(() -> {
      Region<String, TickerData> region = getCache().getRegion(regionName);
      region.getAttributesMutator()
          .addCacheListener(new SlowCountingCacheListener<>(new Action<>(Operation.CREATE,
              creates -> closeCacheConditionally(creates, 10))));
    });

    // server2 add slow listener
    server2.invoke(() -> {
      Region<String, TickerData> region = getCache().getRegion(regionName);
      region.getAttributesMutator()
          .addCacheListener(new SlowCountingCacheListener<>(new Action<>(Operation.CREATE,
              creates -> closeCacheConditionally(creates, 20))));
    });

    // server3 add slow listener
    server3.invoke(() -> {
      COUNTER.set(new Counter("server3"));
      Region<String, TickerData> region = getCache().getRegion(regionName);
      region.getAttributesMutator()
          .addCacheListener(new SlowCountingCacheListener<>(COUNTER.get()));
    });

    // client1 add listener and putAll
    client1.invoke(() -> {
      Region<String, TickerData> region = getClientCache().getRegion(regionName);
      doPutAll(region, keyPrefix, ONE_HUNDRED);

      assertThat(COUNTER.get().getCreates()).isEqualTo(100);
      assertThat(COUNTER.get().getUpdates()).isZero();
    });

    // server3 print counter
    server3.invoke(() -> {
      Region<String, TickerData> region = getCache().getRegion(regionName);

      assertThat(region.size())
          .describedAs("Should have 100 entries plus 3 to 4 buckets worth of entries")
          .isIn(ONE_HUNDRED + 3 * ONE_HUNDRED / 10, ONE_HUNDRED + 4 * ONE_HUNDRED / 10);
      assertThat(COUNTER.get().getUpdates()).isZero();
      verifyPutAll(region, keyPrefix);
    });
  }
The purpose of this test is to validate that when two servers of three in a cluster configured
with a client doing singlehop, that the client gets afterCreate messages for each entry in the
putall. Further, we also check that the region size is correct on the remaining server.
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/PutAllClientServerDistributedTest.java