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")
	}
}
Get200Model204NoModelDefaultError204Valid - Send a 204 response with no payload
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")
	}
}