Update Stack.java

Don't forget to add listener tests