func call(op string, args [][]string, allowError bool) {
	v := reflect.ValueOf(World["client"])
	if m := findMethod(v, op); m != nil {
		t := m.Type()
		in := reflect.New(t.In(0).Elem())
		fillArgs(in, args)
		resps := m.Call([]reflect.Value{in})
		World["response"] = resps[0].Interface()
		World["error"] = resps[1].Interface()
		if !allowError {
			err, _ := World["error"].(error)
			assert.NoError(T, err)
		}
	} else {
		assert.Fail(T, "failed to find operation "+op)
	}
}
call calls an operation on World["client"] by the name op using the args
table of arguments to set.
package shared
import (
	"fmt"
	"os"
	"reflect"
	"regexp"
	"strconv"
	"strings"
	"github.com/ks3sdklib/aws-sdk-go/aws"
	"github.com/ks3sdklib/aws-sdk-go/aws/awserr"
	"github.com/ks3sdklib/aws-sdk-go/aws/awsutil"
	. "github.com/lsegal/gucumber"
	"github.com/stretchr/testify/assert"
)
const Imported = true
func init() {
	if os.Getenv("DEBUG") != "" {
		aws.DefaultConfig.LogLevel = 1
	}
	if os.Getenv("DEBUG_BODY") != "" {
		aws.DefaultConfig.LogLevel = 1
		aws.DefaultConfig.LogHTTPBody = true
	}
	When(`^I call the "(.+?)" API$`, func(op string) {
		call(op, nil, false)
	})
	When(`^I call the "(.+?)" API with:$`, func(op string, args [][]string) {
		call(op, args, false)
	})
	Then(`^the value at "(.+?)" should be a list$`, func(member string) {
		vals := awsutil.ValuesAtAnyPath(World["response"], member)
		assert.NotEmpty(T, vals)
	})
	Then(`^the response should contain a "(.+?)"$`, func(member string) {
		vals := awsutil.ValuesAtAnyPath(World["response"], member)
		assert.NotEmpty(T, vals)
	})
	When(`^I attempt to call the "(.+?)" API with:$`, func(op string, args [][]string) {
		call(op, args, true)
	})
	Then(`^I expect the response error code to be "(.+?)"$`, func(code string) {
		err, ok := World["error"].(awserr.Error)
		assert.True(T, ok, "no error returned")
		if ok {
			assert.Equal(T, code, err.Code())
		}
	})
	And(`^I expect the response error message to include:$`, func(data string) {
		err, ok := World["error"].(awserr.Error)
		assert.True(T, ok, "no error returned")
		if ok {
			assert.Contains(T, err.Message(), data)
		}
	})
	And(`^I expect the response error message to include one of:$`, func(table [][]string) {
		err, ok := World["error"].(awserr.Error)
		assert.True(T, ok, "no error returned")
		if ok {
			found := false
			for _, row := range table {
				if strings.Contains(err.Message(), row[0]) {
					found = true
					break
				}
			}
			assert.True(T, found, fmt.Sprintf("no error messages matched: \"%s\"", err.Message()))
		}
	})
}
func findMethod(v reflect.Value, op string) *reflect.Value {
	t := v.Type()
	op = strings.ToLower(op)
	for i := 0; i < t.NumMethod(); i++ {
		name := t.Method(i).Name
		if strings.ToLower(name) == op {
			m := v.MethodByName(name)
			return &m
		}
	}
	return nil
}