public static void verifyDispatchedMessagesRemoved() {
    try {
      Region region = hrq.getRegion();
      if (region.get(0L) != null) {
        fail("Expected message to have been deleted but it is not deleted");
      }

      if (region.get(1L) == null) {
        fail("Expected message not to have been deleted but it is deleted");
      }
    } catch (Exception e) {
      fail("test failed due to an exception :  " + e);
    }
  }
create a client with 2 regions sharing a common writer
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ha/HARegionDUnitTest.java