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: client_test.go
    path of file: ./repos/juju/api/client/imagemetadatamanager
    
    the code of the file until where you have to start completion: // Copyright 2017 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package imagemetadatamanager_test

import (
	"regexp"

	"github.com/juju/errors"
	jc "github.com/juju/testing/checkers"
	"go.uber.org/mock/gomock"
	gc "gopkg.in/check.v1"

	basemocks "github.com/juju/juju/api/base/mocks"
	"github.com/juju/juju/api/client/imagemetadatamanager"
	corebase "github.com/juju/juju/core/base"
	"github.com/juju/juju/rpc/params"
)

type imagemetadataSuite struct {
}

var _ = gc.Suite(&imagemetadataSuite{})

func (s *imagemetadataSuite) TestList(c *gc.C) {
	ctrl := gomock.NewController(c)
	defer ctrl.Finish()

	// setup data for test
	imageId := "imageid"
	stream := "stream"
	region := "region"

	// This is used by filters to sear
    
func (s *imagemetadataSuite) TestList(c *gc.C) {
	ctrl := gomock.NewController(c)
	defer ctrl.Finish()

	// setup data for test
	imageId := "imageid"
	stream := "stream"
	region := "region"

	// This is used by filters to search function
	base := corebase.MustParseBaseFromString("ubuntu@22.04")
	version := base.Channel.Track

	arch := "arch"
	virtType := "virt-type"
	rootStorageType := "root-storage-type"
	rootStorageSize := uint64(1024)
	source := "source"

	instances := []params.CloudImageMetadata{
		{
			ImageId:         imageId,
			Stream:          stream,
			Region:          region,
			Version:         version,
			Arch:            arch,
			VirtType:        virtType,
			RootStorageType: rootStorageType,
			RootStorageSize: &rootStorageSize,
			Source:          source,
		},
	}

	args := params.ImageMetadataFilter{
		Arches:          []string{arch},
		Stream:          stream,
		VirtType:        virtType,
		RootStorageType: rootStorageType,
		Region:          region,
		Versions:        []string{"22.04"},
	}
	res := new(params.ListCloudImageMetadataResult)
	ress := params.ListCloudImageMetadataResult{
		Result: instances,
	}
	mockFacadeCaller := basemocks.NewMockFacadeCaller(ctrl)
	mockFacadeCaller.EXPECT().FacadeCall("List", args, res).SetArg(2, ress).Return(nil)
	client := imagemetadatamanager.NewClientFromCaller(mockFacadeCaller)
	found, err := client.List(
		stream, region,
		[]corebase.Base{base}, []string{arch},
		virtType, rootStorageType,
	)
	c.Check(err, jc.ErrorIsNil)
	c.Assert(found, jc.DeepEquals, instances)
}