### Question:
PriorityMessageQueue { public T remove() { if (isEmpty()) { return null; } final var root = queue[0]; queue[0] = queue[size - 1]; size--; maxHeapifyDown(); return root; } PriorityMessageQueue(T[] queue); T remove(); void add(T t); boolean isEmpty(); void print();  }### Answer:
@Test public void remove() { var stringPriorityMessageQueue = new PriorityMessageQueue<>(new String[2]); var pushMessage = "test"; stringPriorityMessageQueue.add(pushMessage); assertEquals(stringPriorityMessageQueue.remove(), pushMessage); }