### Question:
CharStack implements CharSequence { public char peek() { int last = builder.length() - 1; if (last < 0) { throw new EmptyStackException(); } return builder.charAt(last); }  void push(char ch); char pop(); char peek(); @Override String toString(); @Override char charAt(int index); @Override int length(); @Override CharSequence subSequence(int start, int end);  }### Answer:
@Test(expected = EmptyStackException.class) public void testEmptyCharStack() { CharStack charStack = new CharStack(); charStack.peek(); }