public class Test {
        public void test() {
            PQueue<String> queue = new PQueue<>();

            System.out.println("Pushing elements...");
            queue.push("apple");
            queue.push("orange");
            queue.push("banana");
            queue.push("pear");

            System.out.println("Size after pushes: " + queue.size());

            try {
                System.out.println("Top " + queue.top());

                System.out.println("Pop: " + queue.pop());
                System.out.println("Size (pop után): " + queue.size());

                System.out.println("Következő top: " + queue.top());

                while (queue.size() > 0) {
                    System.out.println("Popped: " + queue.pop());
                }

                System.out.println("Üresből popolni...");
                queue.pop();
            } catch (EmptyQueueException e) {
                System.out.println("Hiba: " + e.getMessage());
            }

            queue.push("grape");
            queue.push("melon");
            System.out.println("Clear előtt méret: " + queue.size());
            queue.clear();
            System.out.println("Clear után méret: " + queue.size());
        }
}
