public byte[] poll(long timeout, TimeUnit unit) throws Exception {
        return internalPoll(timeout, unit);
    }
@Test
    public void testPollWithTimeout() throws Exception {
        CuratorFramework clients[] = null;
        try {
            String dir = "/testOffer1";
            final int num_clients = 1;
            clients = new CuratorFramework[num_clients];
            SimpleDistributedQueue queueHandles[] = new SimpleDistributedQueue[num_clients];
            for (int i = 0; i < clients.length; i++) {
                clients[i] = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));
                clients[i].start();
                queueHandles[i] = new SimpleDistributedQueue(clients[i], dir);
            }

            assertNull(queueHandles[0].poll(3, TimeUnit.SECONDS));
        } finally {
            closeAll(clients);
        }
    }