@Test
  public void testThreadIdentifierStats() throws Exception {
    HARegionQueue rq = createHARegionQueue("testRemoveByQrmStats");
    Conflatable cf = null;

    int totalEvents = 100;
    for (int i = 0; i < totalEvents; i++) {
      cf = new ConflatableObject("key" + i, "value" + i, new EventID(new byte[] {1}, i, i), false,
          "testing");
      rq.put(cf);
    }

    HARegionQueueStats stats = rq.getStatistics();
    assertNotNull("stats for HARegionQueue found null", stats);

    assertEquals(
        "eventsEnqued by stats not equal to the actual number of events added to the queue",
        totalEvents, stats.getEventsEnqued());
    assertEquals("threadIdentifiers stats not updated properly", totalEvents,
        stats.getThreadIdentiferCount());

  }
This test does the following:<br>
1)Create HARegionQueue.<br>
2)Add objects with unique eventids as well as ThreadIDs and conflation false<br>
3)Verify that statistics object is not null<br>
4)Verify that total events added matches the eventsEnqued stats<br>
5)Verify that threadIdentifiers stats is same as the number of events added as all the events
had different ThreadIdentifier objects.

@throws Exception - thrown if any problem occurs in test execution
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ha/HARegionQueueStatsJUnitTest.java