func (m *DiscoveryMapper) Refresh() (meta.RESTMapper, error) {
	return m.MockRefresh()
}
Refresh for mock
package mock
import (
	"github.com/crossplane/oam-kubernetes-runtime/pkg/oam/discoverymapper"
	"k8s.io/apimachinery/pkg/api/meta"
	"k8s.io/apimachinery/pkg/runtime/schema"
)
var _ discoverymapper.DiscoveryMapper = &DiscoveryMapper{}
type GetMapper func() (meta.RESTMapper, error)
type Refresh func() (meta.RESTMapper, error)
type RESTMapping func(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error)
type KindsFor func(input schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
func NewMockDiscoveryMapper() *DiscoveryMapper {
	return &DiscoveryMapper{
		MockRESTMapping: NewMockRESTMapping(""),
		MockKindsFor:    NewMockKindsFor(""),
	}
}
func NewMockRESTMapping(resource string) RESTMapping {
	return func(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error) {
		return &meta.RESTMapping{Resource: schema.GroupVersionResource{Resource: resource, Version: versions[0], Group: gk.Group}}, nil
	}
}
func NewMockKindsFor(kind string, version ...string) KindsFor {
	return func(input schema.GroupVersionResource) ([]schema.GroupVersionKind, error) {
		if len(kind) <= 1 {
			return []schema.GroupVersionKind{{Version: input.Version, Group: input.Group, Kind: kind}}, nil
		}
		var ss []schema.GroupVersionKind
		for _, v := range version {
			gvk := schema.GroupVersionKind{Version: v, Group: input.Group, Kind: kind}
			if input.Version != "" && input.Version == v {
				return []schema.GroupVersionKind{gvk}, nil
			}
			ss = append(ss, gvk)
		}
		return ss, nil
	}
}
type DiscoveryMapper struct {
	MockGetMapper   GetMapper
	MockRefresh     Refresh
	MockRESTMapping RESTMapping
	MockKindsFor    KindsFor
}
func (m *DiscoveryMapper) GetMapper() (meta.RESTMapper, error) {
	return m.MockGetMapper()
}