// Path: src/main/java/io/github/marioluan/datastructures/priority/queue/LinkedListIterator.java
// public class LinkedListIterator<T extends Comparable<T>>
//         implements Iterator<T> {
//     private Node<T> cursor;
// 
//     /**
//      * Constructs the iterator by pointing its cursor to the head.
//      */
//     public LinkedListIterator(Node<T> head) {
//         this.cursor = head;
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     public boolean hasNext() {
//         return this.cursor != null;
//     }
// 
//     /**
//      * Operation not permitted.
//      * 
//      * @throws UnsupportedOperationException
//      */
//     public void remove() {
//         throw new UnsupportedOperationException();
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     public T next() {
//         if (!hasNext())
//             throw new NoSuchElementException();
// 
//         T oldItem = this.cursor.data;
//         this.cursor = this.cursor.next;
// 
//         return oldItem;
//     }
// }


import static com.greghaskins.spectrum.Spectrum.afterEach;
import static com.greghaskins.spectrum.Spectrum.beforeEach;
import static com.greghaskins.spectrum.Spectrum.describe;
import static com.greghaskins.spectrum.Spectrum.it;
import static org.junit.Assert.*;
import java.util.Random;
import io.github.marioluan.datastructures.priority.queue.LinkedListIterator;
import org.hamcrest.CoreMatchers;
import org.junit.runner.RunWith;
import com.greghaskins.spectrum.Spectrum;
                        subject.add(item);
                    });

                    it("returns false", () -> {
                        assertFalse(subject.isEmpty());
                    });
                });
            });

            describe("#size", () -> {
                describe("when it is empty", () -> {
                    it("returns zero", () -> {
                        assertEquals(0, subject.size());
                    });
                });

                describe("when it is not empty", () -> {
                    beforeEach(() -> {
                        item = new Random().nextInt();
                        subject.add(item);
                    });

                    it("returns greater than zero", () -> {
                        assertTrue(subject.size() > 0);
                    });
                });
            });

            describe("#iterator", () -> {
                it("returns an instance of LinkedListIterator", () -> {
// Path: src/main/java/io/github/marioluan/datastructures/priority/queue/LinkedListIterator.java
// public class LinkedListIterator<T extends Comparable<T>>
//         implements Iterator<T> {
//     private Node<T> cursor;
// 
//     /**
//      * Constructs the iterator by pointing its cursor to the head.
//      */
//     public LinkedListIterator(Node<T> head) {
//         this.cursor = head;
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     public boolean hasNext() {
//         return this.cursor != null;
//     }
// 
//     /**
//      * Operation not permitted.
//      * 
//      * @throws UnsupportedOperationException
//      */
//     public void remove() {
//         throw new UnsupportedOperationException();
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     public T next() {
//         if (!hasNext())
//             throw new NoSuchElementException();
// 
//         T oldItem = this.cursor.data;
//         this.cursor = this.cursor.next;
// 
//         return oldItem;
//     }
// }


// Path: src/test/java/io/github/marioluan/datastructures/multiset/BagTest.java
import static com.greghaskins.spectrum.Spectrum.afterEach;
import static com.greghaskins.spectrum.Spectrum.beforeEach;
import static com.greghaskins.spectrum.Spectrum.describe;
import static com.greghaskins.spectrum.Spectrum.it;
import static org.junit.Assert.*;
import java.util.Random;
import io.github.marioluan.datastructures.priority.queue.LinkedListIterator;
import org.hamcrest.CoreMatchers;
import org.junit.runner.RunWith;
import com.greghaskins.spectrum.Spectrum;

                        subject.add(item);
                    });

                    it("returns false", () -> {
                        assertFalse(subject.isEmpty());
                    });
                });
            });

            describe("#size", () -> {
                describe("when it is empty", () -> {
                    it("returns zero", () -> {
                        assertEquals(0, subject.size());
                    });
                });

                describe("when it is not empty", () -> {
                    beforeEach(() -> {
                        item = new Random().nextInt();
                        subject.add(item);
                    });

                    it("returns greater than zero", () -> {
                        assertTrue(subject.size() > 0);
                    });
                });
            });

            describe("#iterator", () -> {
                it("returns an instance of LinkedListIterator", () -> {
                    assertThat(subject.iterator(), CoreMatchers.instanceOf(LinkedListIterator.class));