test case shouldPushToStack