### Question:
MulBlockingQueue { public List<E> take(BitSet queueIds) throws InterruptedException { List<E> re = poll(queueIds); if (!re.isEmpty()) { return re; } final ReentrantLock takeLock = this.takeLock; takeLock.lockInterruptibly(); try { while (this.readyQueueIds.isEmpty()) { notEmpty.await(); } } finally { takeLock.unlock(); } re = poll(queueIds); if (!this.readyQueueIds.isEmpty()) { signalNotEmpty(); } return re; } 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 take() throws InterruptedException { final MulBlockingQueue<Payload> mq = new MulBlockingQueue<>(0x20); BitSet indexs = new BitSet(2); indexs.set(mq.register("eosgroup1")); indexs.set(mq.register("eosgroup2")); Thread a = new Thread(() -> { try { Thread.sleep(200); mq.put(new Payload(0, "package"), 0); } catch (Exception e) { logger.error("Exception in MulBlockingQueueTest.take():", e); } }); long start = System.currentTimeMillis(); a.start(); mq.take(indexs); long end = System.currentTimeMillis(); Assert.assertTrue((end - start) >= 200); }