CMLStack { String current() { if (sp > 0) { return stack[sp - 1]; } else { return ""; } }  @Override String toString();  }
@Test public void testCurrent() { CMLStack stack = new CMLStack(); stack.push("first"); Assert.assertEquals("first", stack.current()); stack.push("second"); Assert.assertEquals("second", stack.current()); stack.push("third"); Assert.assertEquals("third", stack.current()); stack.pop(); Assert.assertEquals("second", stack.current()); stack.pop(); Assert.assertEquals("first", stack.current()); }