CMLModuleStack { public void push(ICMLModule item) { if (sp == stack.length) { ICMLModule[] temp = new ICMLModule[2 * sp]; System.arraycopy(stack, 0, temp, 0, sp); stack = temp; } stack[sp++] = item; }  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 testPush_String() { CMLModuleStack stack = new CMLModuleStack(); for (int i = 0; i < 100; i++) { stack.push(new CMLCoreModule((IChemFile) null)); } }