@Test
public void testPop() {

    CMLModuleStack stack = new CMLModuleStack();
    ICMLModule first = new CMLCoreModule((IChemFile) null);
    ICMLModule second = new CMLCoreModule((IChemFile) null);
    ICMLModule third = new CMLCoreModule((IChemFile) null);
    stack.push(first);
    stack.push(second);
    stack.push(third);
    Assert.assertEquals(third, stack.pop());
    Assert.assertEquals(second, stack.pop());
    Assert.assertEquals(first, stack.pop());
    try {
        Assert.assertEquals("doesNotExist", stack.pop());
        Assert.fail("Should have received an ArrayIndexOutOfBoundsException");
    } catch (Exception exception) {
        // OK, should happen
    }
}