Address go vet declaration issue in tests