SimpleHeapImpl implements Heap<T> { @Override public boolean isEmpty() { return size() == 0; } SimpleHeapImpl(Comparator<T> comparator);  SimpleHeapImpl(List<T> list, Comparator<T> comparator);  SimpleHeapImpl(T[] array, Comparator<T> comparator); @Override int size(); @Override T peek(); @Override T pop(); @Override void add(T element); @Override boolean isEmpty();  }
@Test public void isEmptyReturnsTrueWithEmptyHeap() { Heap<Integer> heap = new SimpleHeapImpl<Integer>(minHeapComparator); assertTrue(heap.isEmpty()); }
@Test public void isEmptyReturnsFalseWithNonEmptyHeap() { Heap<Integer> heap = new SimpleHeapImpl<Integer>(listWithElements, minHeapComparator); assertFalse(heap.isEmpty()); }