### Question:
BlockingQueue { public synchronized int pending() { return queue.size(); }  synchronized void enqueue(Object o); synchronized void requeue(Object o); synchronized Object dequeue(); synchronized Object dequeue(long timeout); synchronized void close(); synchronized int consumerCount(); synchronized int consumerDeficit(); synchronized boolean ready(); synchronized int pending(); LinkedList getQueue(); void setQueue(LinkedList queue);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testPending() throws Throwable { BlockingQueue blockingQueue = new BlockingQueue(); LinkedList queue = new LinkedList(); queue.add(Integer.valueOf(100)); blockingQueue.setQueue(queue); int result = blockingQueue.pending(); assertEquals(1, result, "result"); }