### Question:
SingleConsumerQueue extends AbstractCollection<E> implements Iterable<E>, Queue<E>, BasicSingleConsumerQueue<E> { @Override public abstract E poll();  @Override abstract boolean enq(E element); @Override abstract E poll(); @Override abstract E peek(); @Override abstract QueueIterator<E> iterator(); @Override abstract int size(); abstract List<E> snapshot(); @Override abstract int capacity(); @Override boolean hasNext(); @Override abstract boolean isEmpty(); @Override boolean add(E e); @Override final boolean removeAll(Collection<?> c); @Override final boolean retainAll(Collection<?> c); @Override final void clear(); @Override boolean offer(E e); @Override E remove(); @Override E element(); @Override String toString();  }### Answer:
@Test public void testPoll() { int j = 1; int k = 1; for (int i = 0; i < 8; i++) { queue.offer("x" + (j++)); queue.offer("x" + (j++)); String s = queue.poll(); assertThat(s, equalTo("x" + (k++))); } assertThat(queue.size(), is(8)); assertThat(list(queue), is(equalTo(list("x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16")))); for (int i = 0; i < 8; i++) { String s = queue.poll(); assertThat(s, equalTo("x" + (k++))); } testEmptyQueue(); }