public boolean isEmpty() {
        return size() == 0;
    }
@Test
    void testIsEmpty() {
        HeapPriorityQueue<TestElement> priorityQueue = newPriorityQueue(1);

        assertThat(priorityQueue.isEmpty()).isTrue();

        assertThat(priorityQueue.add(new TestElement(4711L, 42L))).isTrue();
        assertThat(priorityQueue.isEmpty()).isFalse();

        priorityQueue.poll();
        assertThat(priorityQueue.isEmpty()).isTrue();
    }