@Test
  public void testAddDispatchedMessageObject() throws Exception {
    haRegionQueue = createHARegionQueue(testName.getMethodName());
    assertThat(HARegionQueue.getDispatchedMessagesMapForTesting().isEmpty(), is(true));

    haRegionQueue.addDispatchedMessage(new ThreadIdentifier(new byte[1], 1), 1);
    haRegionQueue.addDispatchedMessage(new ThreadIdentifier(new byte[1], 2), 2);

    assertThat(!HARegionQueue.getDispatchedMessagesMapForTesting().isEmpty(), is(true));
  }
This test does the following :<br>
1)Create producer threads to add objects to queue <br>
2)Start all the producers,all of them will do puts against same set of ids <br>
3)Wait till all put-threads complete their job <br>
4)verify that the size of the queue is equal to the total number of puts done by one thread (as
rest of them will be duplicates and hence will be replaced)
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ha/HARegionQueueJUnitTest.java