### Question:
HeapPriorityQueue extends AbstractPriorityQueue<K,V> { @Override public Entry<K,V> insert(K key, V value) throws IllegalArgumentException ; HeapPriorityQueue();  HeapPriorityQueue(Comparator<K> comp); @Override int size(); @Override Entry<K,V> min(); @Override Entry<K,V> insert(K key, V value); @Override Entry<K,V> removeMin();  }### Answer:
@Test void testInsert() { Integer[] arr = new Integer[] {35,26,15,24,33,4,12,1,23,21,2,5}; HeapPriorityQueue<Integer, String> pq = new HeapPriorityQueue<>(); for(Integer i : arr) pq.insert(i, Integer.toString(i)); assertEquals(12, pq.size()); assertEquals("[1, 2, 5, 23, 4, 12, 15, 35, 24, 33, 21, 26]", pq.toString()); }
@Test void testToString() { Integer[] arr = new Integer[] {35,26,15,24,33,4,12,1,23,21,2,5}; HeapPriorityQueue<Integer, String> pq = new HeapPriorityQueue<>(); for(Integer i : arr) pq.insert(i, Integer.toString(i)); assertEquals("[1, 2, 5, 23, 4, 12, 15, 35, 24, 33, 21, 26]", pq.toString()); }