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: key_test.go
    path of file: ./repos/kubeedge/pkg/metaserver
    
    the code of the file until where you have to start completion: package metaserver

import (
	"context"
	"net/http"
	"testing"

	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/apimachinery/pkg/util/sets"
	"k8s.io/apiserver/pkg
    
func TestKeyFuncObj(t *testing.T) {
	cases := []struct {
		// group version kind namespace name
		attr      []string
		stdResult string
	}{
		{
			attr:      []string{"", "v1", "Pod", "default", "pods-foo"},
			stdResult: "/core/v1/pods/default/pods-foo",
		},
		{
			attr:      []string{"", "v1", "Endpoints", "default", "pods-foo"},
			stdResult: "/core/v1/endpoints/default/pods-foo",
		},
		{
			attr:      []string{"", "v1", "Configmap", "default", "pods-foo"},
			stdResult: "/core/v1/configmaps/default/pods-foo",
		},
		{
			attr:      []string{"", "v1", "KindFoo", "ns-bar", "name-whatever"},
			stdResult: "/core/v1/kindfoos/ns-bar/name-whatever",
		},
		{
			attr:      []string{"apps", "v1", "Deployment", "ns-bar", "name-whatever"},
			stdResult: "/apps/v1/deployments/ns-bar/name-whatever",
		},
		{
			attr:      []string{"", "v1", "KindFoo", "", "name-whatever"},
			stdResult: "/core/v1/kindfoos/null/name-whatever",
		},
	}
	for _, test := range cases {
		t.Run("parseKey", func(t *testing.T) {
			var obj unstructured.Unstructured
			gvk := schema.GroupVersionKind{
				Group:   test.attr[0],
				Version: test.attr[1],
				Kind:    test.attr[2],
			}
			obj.SetGroupVersionKind(gvk)
			obj.SetNamespace(test.attr[3])
			obj.SetName(test.attr[4])

			key, err := KeyFuncObj(&obj)
			if err != nil {
				t.Errorf("Unexpected error %v", err)
			}
			if test.stdResult != key {
				t.Errorf("KeyFuncObj Case failed,wanted result:%+v,acctual result:%+v", test.stdResult, key)
			}
		})
	}
}