Test added: Call top on empty stack throws exception.