CMLModuleStack { public ICMLModule current() { if (sp > 0) { return stack[sp - 1]; } else { return null; } }  void push(ICMLModule item); int length(); ICMLModule pop(); ICMLModule current(); @Override String toString(); boolean endsWith(ICMLModule lastElement); boolean endsWith(ICMLModule oneButLast, ICMLModule lastElement); boolean endsWith(ICMLModule twoButLast, ICMLModule oneButLast, ICMLModule lastElement);  }
@Test public void testCurrent() { CMLModuleStack stack = new CMLModuleStack(); ICMLModule first = new CMLCoreModule((IChemFile) null); stack.push(first); Assert.assertEquals(first, stack.current()); }