### Question:
DistributedQueue implements QueueBase<T> { public void putMulti(MultiItem<T> items) throws Exception { putMulti(items, 0, null); } DistributedQueue(
            CuratorFramework client,
            QueueConsumer<T> consumer,
            QueueSerializer<T> serializer,
            String queuePath,
            ThreadFactory threadFactory,
            Executor executor,
            int minItemsBeforeRefresh,
            boolean refreshOnWatch,
            String lockPath,
            int maxItems,
            boolean putInBackground,
            int finalFlushMs
        ); @Override void start(); @Override void close(); @Override ListenerContainer<QueuePutListener<T>> getPutListenerContainer(); @Override void setErrorMode(ErrorMode newErrorMode); @Override boolean flushPuts(long waitTime, TimeUnit timeUnit); void put(T item); boolean put(T item, int maxWait, TimeUnit unit); void putMulti(MultiItem<T> items); boolean putMulti(MultiItem<T> items, int maxWait, TimeUnit unit); @Override int getLastMessageCount();  }### Answer:
@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<TestQueueItem>(Mockito.mock(ConnectionStateListener.class)); 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); Assert.assertNotNull(queueItem); Assert.assertEquals(queueItem, new TestQueueItem(Integer.toString(i))); } } finally { CloseableUtils.closeQuietly(queue); CloseableUtils.closeQuietly(client); } }