assertEquals(testAge, avgAge);
}
@Test
public void testEventOperationCount() {
IQueue queue = newQueue();
TestListener listener = new TestListener(30);
queue.addItemListener(listener, true);
for (int i = 0; i < 30; i++) {
queue.offer("item" + i);
}
for (int i = 0; i < 30; i++) {
queue.poll();
}
LocalQueueStats stats = queue.getLocalQueueStats();
assertOpenEventually(listener.addedLatch);
assertOpenEventually(listener.removedLatch);
assertEquals(60, stats.getEventOperationCount());
}