ObjectQueue implements Iterable<T>, Closeable { public abstract @Nullable T peek() throws IOException;  static ObjectQueue<T> create(QueueFile qf, Converter<T> converter); static ObjectQueue<T> createInMemory(); abstract @Nullable QueueFile file(); abstract int size(); boolean isEmpty(); abstract void add(T entry); abstract @Nullable T peek(); List<T> peek(int max); List<T> asList(); void remove(); abstract void remove(int n); void clear();  }
@Test public void peek() throws IOException { assertThat(queue.peek()).isEqualTo("one"); }
@Test public void peekMultiple() throws IOException { assertThat(queue.peek(2)).containsExactly("one", "two"); }
@Test public void peekMaxCanExceedQueueDepth() throws IOException { assertThat(queue.peek(6)).containsExactly("one", "two", "three"); }