Refactored code to pass tests and set hashtag array in task instance instead of retrieving from db
Added tests