You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: convert_test.go
    path of file: ./repos/terraform/internal/stacks/tfstackdata1
    
    the code of the file until where you have to start completion: // Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

package tfstackdata1

import (
	"testing"

	"github.com/google/go-cmp/cmp"
	"github.com/zclconf/go-cty/cty"
	"github.com/zclconf/go-cty/cty/msgpack"
	"google.golang.org/protobuf/testing/protocmp"

	"github.com/hashicorp/terraform/internal/lang/marks"
	"github.com/hashicorp/terraform/internal/plans/planproto"
)

func TestDynamicValueToTFStackData1(t *testing.T) {
	startVal := cty.ObjectVal(map[string]cty.Value{
		"a": cty.StringVal("a").Mark(marks.Sensitive),
		"b": cty.StringVal("b"),
		"c": cty.ListVal([]cty.Value{
			cty.StringVal("c[0]"),
			cty.StringVal("c[1]").Mark(marks.Sensitive),
		}),
	})
	ty := startVal.Type()

	got, err := DynamicValueToTFStackData1(startVal, ty)
	if err != nil {
		t.Fatalf("unexpected error: %s", err)
	}
	want := &DynamicValue{
		Value: &planproto.DynamicValue{
			// The following is cty's
    
func TestDynamicValueFromTFStackData1(t *testing.T) {
	startVal := cty.ObjectVal(map[string]cty.Value{
		"a": cty.StringVal("a").Mark(marks.Sensitive),
		"b": cty.StringVal("b"),
		"c": cty.ListVal([]cty.Value{
			cty.StringVal("c[0]"),
			cty.StringVal("c[1]").Mark(marks.Sensitive),
		}),
	})
	ty := startVal.Type()

	// We'll use the MessagePack encoder directly to get the raw bytes
	// representing the above, just for maintainability's sake since it's
	// challenging to read and modify raw MessagePack values.
	unmarkedVal, _ := startVal.UnmarkDeep()
	raw, err := msgpack.Marshal(unmarkedVal, ty)
	if err != nil {
		t.Fatal(err)
	}

	input := &DynamicValue{
		Value: &planproto.DynamicValue{
			Msgpack: raw,
		},
		SensitivePaths: []*planproto.Path{
			{
				Steps: []*planproto.Path_Step{
					{
						Selector: &planproto.Path_Step_AttributeName{
							AttributeName: "a",
						},
					},
				},
			},
			{
				Steps: []*planproto.Path_Step{
					{
						Selector: &planproto.Path_Step_AttributeName{
							AttributeName: "c",
						},
					},
					{
						Selector: &planproto.Path_Step_ElementKey{
							ElementKey: &planproto.DynamicValue{
								Msgpack: []byte{0b00000001}, // MessagePack-encoded fixint 1
							},
						},
					},
				},
			},
		},
	}

	got, err := DynamicValueFromTFStackData1(input, ty)
	if err != nil {
		t.Fatalf("unexpected error: %s", err)
	}
	want := startVal

	if !want.RawEquals(got) {
		t.Errorf("wrong result\ngot:  %#v\nwant: %#v", got, want)
	}
}