### Question:
JsonQueue implements Queue<T> { @Override public SendQueue<T> sendQueueWithAutoFlush(int interval, TimeUnit timeUnit) { final SendQueue<String> sendQueue = queue.sendQueueWithAutoFlush(interval, timeUnit); return createJsonSendQueue(sendQueue); } JsonQueue(final Queue<String> queue,
                     final Function<String, T> fromJsonFunction,
                     final Function<T, String> toJsonFunction);  JsonQueue(final Class<T> classType,
                     final Queue<String> queue,
                     final JsonMapper jsonMapper);  JsonQueue(Class<T> classType, Queue<String> queue); static JsonQueue<List<T>> createListQueueWithMapper(final Class<T> componentClass,
                                                                   final Queue<String> queue,
                                                                   final JsonMapper jsonMapper); static JsonQueue<List<T>> createListQueue(final Class<T> componentClass,
                                                         final Queue<String> queue); static JsonQueue<Map<K, V>> createMapQueueWithMapper(
            final Class<K> mapKeyClass,
            final Class<V> valueKeyClass,
            final Queue<String> queue,
            final JsonMapper jsonMapper); static JsonQueue<Map<K, V>> createMapQueue(final Class<K> mapKeyClass,
                                                             final Class<V> valueKeyClass,
                                                             final Queue<String> queue); @Override ReceiveQueue<T> receiveQueue(); @Override SendQueue<T> sendQueue(); @Override SendQueue<T> sendQueueWithAutoFlush(int interval, TimeUnit timeUnit); @Override SendQueue<T> sendQueueWithAutoFlush(PeriodicScheduler periodicScheduler, int interval, TimeUnit timeUnit); @Override void startListener(final ReceiveQueueListener<T> listener); @Override int size(); @Override boolean started(); @Override String name(); @Override void stop();  }### Answer:
@Test public void testSendConsume3() throws Exception { personSendQueue = personQueue.sendQueueWithAutoFlush(10, TimeUnit.MILLISECONDS); personSendQueue.sendMany(new Person("Geoff"), new Person("Rick")); final Person geoff = personReceiveQueue.take(); final Person rick = personReceiveQueue.take(); assertEquals("Geoff", geoff.name); assertEquals("Rick", rick.name); }
@Test public void testSendConsume4() throws Exception { personSendQueue = personQueue.sendQueueWithAutoFlush(QBit.factory().periodicScheduler(), 10, TimeUnit.MILLISECONDS); personSendQueue.sendBatch(Lists.list(new Person("Geoff"), new Person("Rick"))); final Person geoff = personReceiveQueue.take(); final Person rick = personReceiveQueue.take(); assertEquals("Geoff", geoff.name); assertEquals("Rick", rick.name); }