QueueConsumersImpl implements QueueConsumers<T> { @Override public boolean add(T t) { boolean result = consumers.add(t); if (result) { iterator.update(consumers.resettableIterator()); } return result; }  @Override boolean hasNext(); @Override T next(); @Override void repeat(); @Override void reset(); @Override boolean add(T t); @Override boolean remove(T t); @Override int size(); @Override boolean isEmpty(); @Override Stream<T> stream(); @Override Iterator<T> iterator(); @Override void forEach(Consumer<? super T> action); @Override Spliterator<T> spliterator(); @Override Set<Integer> getPriorites();  }
@Test public void addTest() { TestPriority testPriority = new TestPriority("hello", 0); assertFalse(queueConsumers.hasNext()); queueConsumers.add(testPriority); queueConsumers.reset(); assertTrue(queueConsumers.hasNext()); assertEquals(testPriority, queueConsumers.next()); }