public void putMulti(MultiItem<T> items) throws Exception {
        putMulti(items, 0, null);
    }
@Test
    public void testPutMulti() throws Exception {
        final int itemQty = 100;

        DistributedQueue<TestQueueItem> queue = null;
        CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));
        client.start();
        try {
            BlockingQueueConsumer<TestQueueItem> consumer =
                    new BlockingQueueConsumer<>(new DummyConnectionStateListener());

            queue = QueueBuilder.builder(client, consumer, serializer, QUEUE_PATH)
                    .buildQueue();
            queue.start();

            MultiItem<TestQueueItem> items = new MultiItem<TestQueueItem>() {
                private int index = 0;

                @Override
                public TestQueueItem nextItem() throws Exception {
                    if (index >= itemQty) {
                        return null;
                    }
                    return new TestQueueItem(Integer.toString(index++));
                }
            };
            queue.putMulti(items);

            for (int i = 0; i < itemQty; ++i) {
                TestQueueItem queueItem = consumer.take(1, TimeUnit.SECONDS);
                assertNotNull(queueItem);
                assertEquals(queueItem, new TestQueueItem(Integer.toString(i)));
            }
        } finally {
            CloseableUtils.closeQuietly(queue);
            CloseableUtils.closeQuietly(client);
        }
    }