MyStack implements SimpleStack<T> { @Override public T peek() { if (depth == 0) { return null; } return stack[depth-1]; } MyStack();  MyStack(int howBig); @Override boolean empty(); @Override void push(T obj); @Override T pop(); @Override T peek(); boolean hasNext(); boolean hasRoom(); int getStackDepth(); static final int DEFAULT_INITIAL; }
@Test public void testPeek() { ss.push("howdy mundo"); assertEquals("howdy mundo", ss.peek()); }
@Test public void testPeekEmpty() { assertNull(ss.peek()); }