private SinkQueue<Integer> newSleepingConsumerQueue(int capacity, int... values) {
        final SinkQueue<Integer> q = new SinkQueue<Integer>(capacity);
        final Semaphore semaphore = new Semaphore(0);
        for (int i : values) {
            q.enqueue(i);
        }
        Thread t = new Thread() {

            @Override
            public void run() {
                try {
                    q.consume(new Consumer<Integer>() {

                        public void consume(Integer e) throws InterruptedException {
                            semaphore.release(1);
                            LOG.info("sleeping");
                            Thread.sleep(1000 * 86400); // a long time
                        }
                    });
                } catch (InterruptedException ex) {
                    LOG.warn("Interrupted", ex);
                }
            }
        };
        t.setName("Sleeping consumer");
        t.setDaemon(true); // so jvm can exit
        t.start();
        try {
            semaphore.acquire();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        LOG.debug("Returning new sleeping consumer queue");
        return q;
    }