### Question:
PriorityQueue implements Iterable<E> { @Nullable public abstract E pop();  abstract boolean isEmpty(); abstract int size(); abstract E push(@NotNull P priority, @NotNull E value); @Nullable final E peek(); @Nullable abstract Pair<P, E> peekPair(); @Nullable abstract Pair<P, E> floorPair(); @Nullable abstract E pop(); abstract void clear(); abstract Guard lock(); abstract void unlock(); static int moveQueue(@NotNull final PriorityQueue<P, E> source,
                                                                     @NotNull final PriorityQueue<P, E> dest);  }### Answer:
@Test public void emptyPop() { Assert.assertNull(createQueue().pop()); }
@Test public void pushPop() { final PriorityQueue<Priority, String> queue = populateQueue(); assertEquals("7", queue.pop()); assertEquals("2", queue.pop()); assertEquals("4", queue.pop()); assertEquals("1", queue.pop()); assertEquals("3", queue.pop()); assertEquals("5", queue.pop()); assertEquals("6", queue.pop()); assertEquals("8", queue.pop()); }
@Test public void pushCopyPop() { final PriorityQueue<Priority, String> queue = populateAndCopyQueue(); assertEquals("7", queue.pop()); assertEquals("2", queue.pop()); assertEquals("4", queue.pop()); assertEquals("1", queue.pop()); assertEquals("3", queue.pop()); assertEquals("5", queue.pop()); assertEquals("6", queue.pop()); assertEquals("8", queue.pop()); }