func TestBuildCorrectURI(t *testing.T) {
	svc := route53.New(nil)
	svc.Handlers.Validate.Clear()
	req, _ := svc.GetHostedZoneRequest(&route53.GetHostedZoneInput{
		ID: aws.String("/hostedzone/ABCDEFG"),
	})

	req.Build()

	utilassert.Match(t, `\/hostedzone\/ABCDEFG$`, req.HTTPRequest.URL.String())
}
func TestErrorHandling(t *testing.T) {
	client := dynamodb.New(nil)
	resp, e := client.DescribeTable(&dynamodb.DescribeTableInput{
		TableName: aws.String("fake-table"),
	})
	err := aws.Error(e)
	_, _, _ = resp, e, err // avoid unused warnings

	assert.NotEqual(t, nil, err)
	assert.Equal(t, "ResourceNotFoundException", err.Code)
	utilassert.Match(t, "Requested resource not found: Table: fake-table not found", err.Message)

}
func TestErrorHandling(t *testing.T) {
	client := elastictranscoder.New(nil)
	resp, e := client.ReadJob(&elastictranscoder.ReadJobInput{
		ID: aws.String("fake_job"),
	})
	err := aws.Error(e)
	_, _, _ = resp, e, err // avoid unused warnings

	assert.NotEqual(t, nil, err)
	assert.Equal(t, "ValidationException", err.Code)
	utilassert.Match(t, "Value 'fake_job' at 'id' failed to satisfy constraint", err.Message)

}
func TestErrorHandling(t *testing.T) {
	client := lambda.New(nil)
	resp, e := client.GetEventSource(&lambda.GetEventSourceInput{
		UUID: aws.String("fake-uuid"),
	})
	err := aws.Error(e)
	_, _, _ = resp, e, err // avoid unused warnings

	assert.NotEqual(t, nil, err)
	assert.Equal(t, "ResourceNotFoundException", err.Code)
	utilassert.Match(t, "does not exist", err.Message)

}
func TestErrorHandling(t *testing.T) {
	client := cloudformation.New(nil)
	resp, e := client.CreateStack(&cloudformation.CreateStackInput{
		StackName:   aws.String("fakestack"),
		TemplateURL: aws.String("http://s3.amazonaws.com/foo/bar"),
	})
	err := aws.Error(e)
	_, _, _ = resp, e, err // avoid unused warnings

	assert.NotEqual(t, nil, err)
	assert.Equal(t, "ValidationError", err.Code)
	utilassert.Match(t, "TemplateURL must reference a valid S3 object to which you have access.", err.Message)

}
func TestErrorHandling(t *testing.T) {
	client := autoscaling.New(nil)
	resp, e := client.CreateLaunchConfiguration(&autoscaling.CreateLaunchConfigurationInput{
		ImageID:                 aws.String("ami-12345678"),
		InstanceType:            aws.String("m1.small"),
		LaunchConfigurationName: aws.String(""),
	})
	err := aws.Error(e)
	_, _, _ = resp, e, err // avoid unused warnings

	assert.NotEqual(t, nil, err)
	assert.Equal(t, "ValidationError", err.Code)
	utilassert.Match(t, "Member must have length greater than or equal to 1", err.Message)

}
func TestErrorHandling(t *testing.T) {
	client := ec2.New(nil)
	resp, e := client.DescribeInstances(&ec2.DescribeInstancesInput{
		InstanceIDs: []*string{
			aws.String("i-12345678"),
		},
	})
	err := aws.Error(e)
	_, _, _ = resp, e, err // avoid unused warnings

	assert.NotEqual(t, nil, err)
	assert.Equal(t, "InvalidInstanceID.NotFound", err.Code)
	utilassert.Match(t, "The instance ID 'i-12345678' does not exist", err.Message)

}