Wrote code to pass view to get all candies test.