### Question:
Stack implements Iterable<E> { public int search(E o) { return list.indexOf(o); } Stack();  Stack(int initialCapacity);  Stack(Stack<E> stack); boolean isEmpty(); E peek(); E pop(); E push(E item); int search(E o); int size(); E get(int depth); void add(E item); void clear(); @Override Iterator<E> iterator(); Stream<E> stream(); @Override int hashCode(); @SuppressWarnings("rawtypes") @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testSearch() { assertEquals(0, stack4.search("1")); assertEquals(1, stack4.search("2")); assertEquals(-1, stack4.search("3")); }