@Override
    public E poll() {
        E item = next();

        if (item != null) {
            return item;
        }

        if (!drainPutStack()) {
            return null;
        }

        return next();
    }
@Test
    public void poll() throws InterruptedException {
        queue.setConsumerThread(Thread.currentThread());

        queue.offer("1");
        queue.offer("2");

        assertEquals("1", queue.poll());
        assertEquals("2", queue.poll());
    }