@Test
  public void clientDeltaPutFetchesTheLatestVersionIfNotYetReceivedQueuedEvent() {
    server.invoke(this::setSlowStartForTesting);
    server2.invoke(this::setSlowStartForTesting);
    initialise(false);

    DeltaTestImpl original = new DeltaTestImpl(0, "0", (double) 0, new byte[0],
        new TestObjectWithIdentifier("0", 0));
    client.invoke(() -> {
      Region r = cache.getRegion(REGION_NAME);
      DeltaTestImpl.NEED_TO_RESET_T0_DELTA = false;
      r.put(KEY1, original);
    });

    client2.invoke(() -> {
      Region r = cache.getRegion(REGION_NAME);
      assertThat(r.get(KEY1)).isEqualTo(original);
    });

    client.invoke(() -> {
      Region r = cache.getRegion(REGION_NAME);
      DeltaTestImpl val = (DeltaTestImpl) r.get(KEY1);
      assertThat(val).isEqualTo(original);
      DeltaTestImpl.NEED_TO_RESET_T0_DELTA = false;
      val.setIntVar(1);
      r.put(KEY1, val);
    });

    client2.invoke(() -> {
      Region r = cache.getRegion(REGION_NAME);
      DeltaTestImpl val = (DeltaTestImpl) r.get(KEY1);
      // delta update should not arrive yet due to slow dispatcher
      assertThat(val).isEqualTo(original);
      DeltaTestImpl.NEED_TO_RESET_T0_DELTA = false;
      val.setStr("1");
      r.put(KEY1, val);
      Object o = r.get(KEY1);
      logger.info("object is " + o);
    });

    server.invoke(() -> {
      Region r = cache.getRegion(REGION_NAME);
      r.get(KEY1);
    });

    server2.invoke(() -> {
      Region r = cache.getRegion(REGION_NAME);
      r.get(KEY1);
    });

    DeltaTestImpl expected = new DeltaTestImpl(1, "1", (double) 0, new byte[0],
        new TestObjectWithIdentifier("0", 0));

    client.invoke(() -> {
      Region r = cache.getRegion(REGION_NAME);
      GeodeAwaitility.await()
          .untilAsserted(() -> assertThat((DeltaTestImpl) r.get(KEY1)).isEqualTo(expected));
    });

    client2.invoke(() -> {
      Region r = cache.getRegion(REGION_NAME);
      GeodeAwaitility.await()
          .untilAsserted(() -> assertThat((DeltaTestImpl) r.get(KEY1)).isEqualTo(expected));
    });
  }
This test does the following for single key (<b> full cycle</b>):<br>
1)Verifies that client-server, peer-peer and server-client processing delta<br>
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java