### Question:
MulBlockingQueue { public long getModCount(int queueId) { DalQueue dalqueue = queues[queueId]; if (dalqueue == null) { return 0; } return dalqueue.modCount.get(); } MulBlockingQueue(int maxQueueNumber); int size(int queueId); String queueName(int queueId); void put(E e, int queueId); @SuppressWarnings("unchecked") List<E> poll(BitSet queueIds); @SuppressWarnings("unchecked") List<E> pollOverDraw(BitSet queueIds); List<E> poll(long timeout, TimeUnit unit, BitSet queueIds); List<E> take(BitSet queueIds); synchronized int register(String queueName); synchronized void unregister(int id); int queueSize(); @Override String toString(); BitSet getReadyQueueIds(); long getModCount(int queueId);  }### Answer:
@Test public void getModCount() throws InterruptedException { MulBlockingQueue<Payload> mq = new MulBlockingQueue<>(1024); BitSet indexs = new BitSet(2); indexs.set(mq.register("eosgroup1")); indexs.set(mq.register("eosgroup2")); mq.poll(indexs); Assert.assertEquals(mq.getModCount(0), 0); Assert.assertEquals(mq.getModCount(1), 0); mq.put(new Payload(0, "p01"), 0); mq.put(new Payload(0, "p02"), 0); mq.put(new Payload(1, "p11"), 1); mq.poll(indexs); Assert.assertEquals(mq.getModCount(0), 3); Assert.assertEquals(mq.getModCount(1), 2); mq.poll(indexs); Assert.assertEquals(mq.getModCount(0), 4); Assert.assertEquals(mq.getModCount(1), 2); mq.put(new Payload(0, "p03"), 0); indexs.clear(0); mq.poll(indexs); Assert.assertEquals(mq.getModCount(0), 5); Assert.assertEquals(mq.getModCount(1), 2); indexs.set(0); mq.take(indexs); Assert.assertEquals(mq.getModCount(0), 6); Assert.assertEquals(mq.getModCount(1), 2); }