    @Test public void poll() throws InterruptedException {

        MulBlockingQueue<Payload> mq = new MulBlockingQueue<>(1024);
        BitSet indexs = new BitSet(2);
        indexs.set(mq.register("eosgroup1"));
        indexs.set(mq.register("eosgroup2"));
        List<Payload> packets = mq.poll(indexs);
        Assert.assertTrue(packets.isEmpty());

        mq.put(new Payload(0, "p01"), 0);
        mq.put(new Payload(0, "p02"), 0);
        mq.put(new Payload(1, "p11"), 1);
        packets = mq.poll(indexs);
        Assert.assertEquals(packets.get(0).data, "p01");
        Assert.assertEquals(packets.get(1).data, "p11");
        packets = mq.poll(indexs);
        Assert.assertEquals(packets.get(0).data, "p02");

        mq.put(new Payload(0, "p03"), 0);
        indexs.clear(0);
        packets = mq.poll(indexs);
        Assert.assertTrue(packets.isEmpty());

        indexs.set(0);
        indexs.clear(1);
        mq.poll(indexs);
        mq.poll(indexs);
        mq.poll(indexs);
        long start = System.currentTimeMillis();
        indexs.set(0);
        mq.poll(200, TimeUnit.MILLISECONDS, indexs);
        long end = System.currentTimeMillis();
        Assert.assertTrue((end - start) >= 200);
    }