func TestGet200ModelA201ModelC404ModelDDefaultError404Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200ModelA201ModelC404ModelDDefaultError404Valid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	r, ok := result.Value.(D)
	if !ok {
		t.Fatalf("unexpected result type %T", result)
	}
	if r := cmp.Diff(r, D{
		HTTPStatusCode: to.StringPtr("404"),
	}); r != "" {
		t.Fatal(r)
	}
}
Get200ModelA201ModelC404ModelDDefaultError404Valid - Send a 200 response with valid payload: {'httpStatusCode': '404'}
package httpinfrastructuregroup
import (
	"context"
	"errors"
	"net/http"
	"reflect"
	"testing"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/google/go-cmp/cmp"
	"github.com/google/go-cmp/cmp/cmpopts"
)
func newMultipleResponsesClient() *MultipleResponsesClient {
	return NewMultipleResponsesClient(NewDefaultConnection(nil))
}
func TestGet200Model201ModelDefaultError200Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200Model201ModelDefaultError200Valid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	switch x := result.Value.(type) {
	case MyException:
		if r := cmp.Diff(x.StatusCode, to.StringPtr("200")); r != "" {
			t.Fatal(r)
		}
	case B:
		if s := result.RawResponse.StatusCode; s != http.StatusCreated {
			t.Fatalf("unexpected status code %d", s)
		}
	default:
		t.Fatalf("unhandled response type %T", x)
	}
}
func TestGet200Model201ModelDefaultError201Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200Model201ModelDefaultError201Valid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	r, ok := result.Value.(B)
	if !ok {
		t.Fatalf("unexpected response type %T", result)
	}
	if r := cmp.Diff(r, B{
		MyException: MyException{
			StatusCode: to.StringPtr("201"),
		},
		TextStatusCode: to.StringPtr("Created"),
	}, cmpopts.IgnoreUnexported(MyException{})); r != "" {
		t.Fatal(r)
	}
}
func TestGet200Model201ModelDefaultError400Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200Model201ModelDefaultError400Valid(context.Background(), nil)
	var r *Error
	if !errors.As(err, &r) {
		t.Fatalf("unexpected error type %T", err)
	}
	if r := cmp.Diff(r, &Error{
		Message: to.StringPtr("client error"),
		Status:  to.Int32Ptr(400),
	}, cmpopts.IgnoreUnexported(Error{})); r != "" {
		t.Fatal(r)
	}
	if !reflect.ValueOf(result).IsZero() {
		t.Fatal("expected nil result")
	}
}
func TestGet200Model204NoModelDefaultError200Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200Model204NoModelDefaultError200Valid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(result.MyException, MyException{
		StatusCode: to.StringPtr("200"),
	}, cmpopts.IgnoreUnexported(MyException{})); r != "" {
		t.Fatal(r)
	}
}
func TestGet200Model204NoModelDefaultError201Invalid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200Model204NoModelDefaultError201Invalid(context.Background(), nil)
	var r *Error
	if !errors.As(err, &r) {
		t.Fatal("unexpected error type")
	}
	if r := cmp.Diff(r, &Error{}, cmpopts.IgnoreUnexported(Error{})); r != "" {
		t.Fatal(r)
	}
	if !reflect.ValueOf(result).IsZero() {
		t.Fatal("expected empty response")
	}
}
func TestGet200Model204NoModelDefaultError202None(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200Model204NoModelDefaultError202None(context.Background(), nil)
	var r *Error
	if !errors.As(err, &r) {
		t.Fatal("unexpected error type")
	}
	if r := cmp.Diff(r, &Error{}, cmpopts.IgnoreUnexported(Error{})); r != "" {
		t.Fatal(r)
	}
	if !reflect.ValueOf(result).IsZero() {
		t.Fatal("expected empty response")
	}
}
func TestGet200Model204NoModelDefaultError204Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200Model204NoModelDefaultError204Valid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if s := result.RawResponse.StatusCode; s != http.StatusNoContent {
		t.Fatalf("unexpected status code %d", s)
	}
	if !reflect.ValueOf(result.MyException).IsZero() {
		t.Fatal("expected zero-value MyException")
	}
}
func TestGet200Model204NoModelDefaultError400Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200Model204NoModelDefaultError400Valid(context.Background(), nil)
	var r *Error
	if !errors.As(err, &r) {
		t.Fatal("unexpected error type")
	}
	if r := cmp.Diff(r, &Error{
		Message: to.StringPtr("client error"),
		Status:  to.Int32Ptr(400),
	}, cmpopts.IgnoreUnexported(Error{})); r != "" {
		t.Fatal(r)
	}
	if !reflect.ValueOf(result).IsZero() {
		t.Fatal("expected empty response")
	}
}
func TestGet200ModelA200Invalid(t *testing.T) {
	t.Skip("payload doen't match schema doesn't cause unmarshalling error")
}
func TestGet200ModelA200None(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200ModelA200None(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if !reflect.ValueOf(result.MyException).IsZero() {
		t.Fatal("expected zero-value MyException")
	}
}
func TestGet200ModelA200Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200ModelA200Valid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(result.MyException, MyException{
		StatusCode: to.StringPtr("200"),
	}, cmpopts.IgnoreUnexported(MyException{})); r != "" {
		t.Fatal(r)
	}
}
func TestGet200ModelA201ModelC404ModelDDefaultError200Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200ModelA201ModelC404ModelDDefaultError200Valid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	r, ok := result.Value.(MyException)
	if !ok {
		t.Fatalf("unexpected result type %T", result)
	}
	if r := cmp.Diff(r, MyException{
		StatusCode: to.StringPtr("200"),
	}, cmpopts.IgnoreUnexported(MyException{})); r != "" {
		t.Fatal(r)
	}
}
func TestGet200ModelA201ModelC404ModelDDefaultError201Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200ModelA201ModelC404ModelDDefaultError201Valid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	r, ok := result.Value.(C)
	if !ok {
		t.Fatalf("unexpected result type %T", result)
	}
	if r := cmp.Diff(r, C{
		HTTPCode: to.StringPtr("201"),
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGet200ModelA201ModelC404ModelDDefaultError400Valid(t *testing.T) {
	client := newMultipleResponsesClient()
	result, err := client.Get200ModelA201ModelC404ModelDDefaultError400Valid(context.Background(), nil)
	var r *Error
	if !errors.As(err, &r) {
		t.Fatal("unexpected error type")
	}
	if r := cmp.Diff(r, &Error{
		Message: to.StringPtr("client error"),
		Status:  to.Int32Ptr(400),
	}, cmpopts.IgnoreUnexported(Error{})); r != "" {
		t.Fatal(r)
	}
	if !reflect.ValueOf(result).IsZero() {
		t.Fatal("expected nil result")
	}
}