@Override
  public boolean hasNext() {
    return !pathStack.isEmpty();
  }
@Test
  void hasNextForEmptyTree() {
    var iter = new BstIterator<>(emptyRoot);
    assertFalse(iter.hasNext(), "hasNext() should return false for empty tree.");
  }