Added unit tests for stack initialization