public T poll() {
        lock.lock();
        try {
            if (queue.size() == 0) {
                moveToUnAvailable();
                return null;
            }
            return dequeue();
        } finally {
            lock.unlock();
        }
    }
@Test
    public void testPoll() throws InterruptedException {
        FutureCompletingBlockingQueue<Integer> queue = new FutureCompletingBlockingQueue<>();
        queue.put(0, 1234);
        Integer value = queue.poll();
        assertThat(value).isNotNull();
        assertThat((int) value).isEqualTo(1234);
    }