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: runner_test.go
    path of file: ./repos/octant/pkg/plugin
    
    the code of the file until where you have to start completion: /*
Copyright (c) 2019 the Octant contributors. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/

package plugin_test

import (
	"context"
	"sync"
	"testing"

	"github.com/golang/mock/gomock"
	"github.com/pkg/errors"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"

	"github.com/vmware-tanzu/octant/internal/gvk"
	"github.com/vmware-tanzu/octant/internal/testutil"
	"github.com/vmware-tanzu/octant/pkg/plugin"
	"github.com/vmware-tanzu/octant/pkg/plugin/fake"
	"github.com/vmware-tanzu/octant/pkg/view/component"
)

func TestDefaultRunner(t *testing.T) {
	counter := 0
	var m sync.Mutex
	pr := plugin.DefaultRunner{
		RunFunc: func(ctx context.Context, name string, gvk schema.GroupVersionKind, object runtime.Object) error {
			m.Lock()
			defer m.Unlock()
			counter++
			return nil
		},
	}

	object := testutil.CreateDeployment("deploym
    
func Test_TabRunner(t *testing.T) {
	controller := gomock.NewController(t)
	defer controller.Finish()

	store := fake.NewMockManagerStore(controller)
	service := fake.NewMockService(controller)

	object := testutil.CreateDeployment("deployment")
	clientNames := []string{"plugin1", "plugin2"}

	plugin1Metadata := &plugin.Metadata{
		Capabilities: plugin.Capabilities{
			SupportsTab: []schema.GroupVersionKind{gvk.Deployment},
		},
	}
	store.EXPECT().
		GetMetadata(gomock.Eq("plugin1")).Return(plugin1Metadata, nil)

	plugin2Metadata := &plugin.Metadata{}
	store.EXPECT().
		GetMetadata(gomock.Eq("plugin2")).Return(plugin2Metadata, nil)

	store.EXPECT().
		GetService(gomock.Eq("plugin1")).Return(service, nil)

	tabResponse := []plugin.TabResponse{
		{
			Tab: &component.Tab{},
		},
	}
	tabs := []component.Tab{
		{
			Name: "",
			Contents: component.FlexLayout{
				Base:   component.Base{},
				Config: component.FlexLayoutConfig{},
			},
		},
	}

	service.EXPECT().
		PrintTabs(gomock.Any(), gomock.Eq(object)).Return(tabResponse, nil)

	ch := make(chan []component.Tab)
	defer close(ch)

	runner := plugin.TabRunner(store, ch)

	done := make(chan bool)
	go func() {
		resp := <-ch
		assert.Equal(t, tabs, resp)
		done <- true
	}()

	defer func() {
		<-done
	}()

	ctx := context.Background()
	require.NoError(t, runner.Run(ctx, object, clientNames))
}