Stack data structure unit testing
Here are some tests I'd perform at the very least. There may be more you'd want:


Create an empty Stack. Test that its size is 0.
Push an element onto the stack. Test that its size is now 1.
Push another element onto the stack. Test that its size is now 2.
Pop an element from the stack. Test that it matches the 2nd pushed value. Check that the size of the stack is now 1.
Pop an element from the stack. Test that it matches the 1st pushed value. Check that the size of the stack is 0.
Attempt to pop an element from the stack. You should receive an ArrayIndexOutOfBounds exception.