@Test
  public void testEventIDPropagation() throws Exception {
    try {
      createClientServerConfiguration();
      client1.invoke(HAEventIdPropagationDistributedTest::setReceivedOperationToFalse);
      client1.invoke(
          HAEventIdPropagationDistributedTest::assertThreadIdToSequenceIdMapisNotNullButEmpty);
      Object eventId1 = server1.invoke(HAEventIdPropagationDistributedTest::putKey1Val1);
      assertNotNull(eventId1);
      // wait for key to propagate till client
      // assert map not null on client
      client1.invoke(HAEventIdPropagationDistributedTest::waitTillOperationReceived);
      Object eventId2 = client1
          .invoke(HAEventIdPropagationDistributedTest::assertThreadIdToSequenceIdMapHasEntryId);
      assertNotNull(eventId2);
      if (!eventId1.equals(eventId2)) {
        fail("Test failed as the eventIds are not equal");
      }

      client1.invoke(HAEventIdPropagationDistributedTest::setReceivedOperationToFalse);
      eventId1 = server1.invoke(HAEventIdPropagationDistributedTest::updateKey1);
      assertNotNull(eventId1);
      // wait for key to propagate till client
      // assert map not null on client
      client1.invoke(HAEventIdPropagationDistributedTest::waitTillOperationReceived);
      eventId2 = client1
          .invoke(HAEventIdPropagationDistributedTest::assertThreadIdToSequenceIdMapHasEntryId);
      assertNotNull(eventId2);
      if (!eventId1.equals(eventId2)) {
        fail("Test failed as the eventIds are not equal");
      }

      client1.invoke(HAEventIdPropagationDistributedTest::setReceivedOperationToFalse);
      eventId1 = server1.invoke(HAEventIdPropagationDistributedTest::invalidateKey1);
      assertNotNull(eventId1);
      // wait for key to propagate till client
      // assert map not null on client
      client1.invoke(HAEventIdPropagationDistributedTest::waitTillOperationReceived);
      eventId2 = client1
          .invoke(HAEventIdPropagationDistributedTest::assertThreadIdToSequenceIdMapHasEntryId);
      assertNotNull(eventId2);
      if (!eventId1.equals(eventId2)) {
        fail("Test failed as the eventIds are not equal");
      }

      client1.invoke(HAEventIdPropagationDistributedTest::setReceivedOperationToFalse);
      EventID[] eventIds1 =
          (EventID[]) server1.invoke(HAEventIdPropagationDistributedTest::putAll);
      assertNotNull(eventIds1);
      // wait for key to propagate till client
      // assert map not null on client
      client1.invoke(HAEventIdPropagationDistributedTest::waitTillOperationReceived);
      EventID[] eventIds2 = (EventID[]) client1
          .invoke(HAEventIdPropagationDistributedTest::assertThreadIdToSequenceIdMapHasEntryIds);
      assertNotNull(eventIds2);
      for (int i = 0; i < 5; i++) {
        assertNotNull(eventIds1[i]);
        assertNotNull(eventIds2[i]);
        if (!eventIds1[i].equals(eventIds2[i])) {
          fail(" eventIds are not equal");
        }
      }

      client1.invoke(HAEventIdPropagationDistributedTest::setReceivedOperationToFalse);
      eventId1 = server1.invoke(HAEventIdPropagationDistributedTest::removePUTALL_KEY1);
      assertNotNull(eventId1);
      // wait for key to propagate till client
      // assert map not null on client
      client1.invoke(HAEventIdPropagationDistributedTest::waitTillOperationReceived);
      eventId2 = client1
          .invoke(HAEventIdPropagationDistributedTest::assertThreadIdToSequenceIdMapHasEntryId);
      assertNotNull(eventId2);
      if (!eventId1.equals(eventId2)) {
        fail("Test failed as the eventIds are not equal");
      }

      client1.invoke(HAEventIdPropagationDistributedTest::setReceivedOperationToFalse);
      eventId1 = server1.invoke(HAEventIdPropagationDistributedTest::destroyKey1);
      assertNotNull(eventId1);
      // wait for key to propagate till client
      // assert map not null on client
      client1.invoke(HAEventIdPropagationDistributedTest::waitTillOperationReceived);
      eventId2 = client1
          .invoke(HAEventIdPropagationDistributedTest::assertThreadIdToSequenceIdMapHasEntryId);
      assertNotNull(eventId2);
      if (!eventId1.equals(eventId2)) {
        fail("Test failed as the eventIds are not equal");
      }
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("test failed due to " + e, e);
    }
  }
This test: 1) creates a client server configuration 2) asserts that the ThreadIdToSequenceIdMap
is not null but is empty (on the client) 3) does a operation on the server 4) Wait till
operation is received by the server (and also records the eventId in a variable) and returns
the eventId generated on the server 5) asserts that the ThreadIdToSequenceIdMap is not null and
has one entry (on the client side) and returns the eventId stored in the map 6) verifies the
equality of the two event ids
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ha/HAEventIdPropagationDistributedTest.java