### Question:
Stack { public int size() { return list.size(); }  void push(T o); T pop(); T replaceTop(T value); T peek(); boolean isEmpty(); int size(); List<T> getList(); static final Stack EMPTY; }### Answer:
@Test public void testSize() throws Exception { assertEquals(stack.size(), 0); stack.push("a"); assertEquals(stack.size(), 1); stack.push("b"); assertEquals(stack.size(), 2); stack.pop(); assertEquals(stack.size(), 1); stack.pop(); assertEquals(stack.size(), 0); }