Refactor test helpers to helper/helper.go