test case shouldPopFromStack