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: resolve_test.go
    path of file: ./repos/td/telegram/peers
    
    the code of the file until where you have to start completion: package peers

import (
	"context"
	"testing"

	"github.com/stretchr/testify/require"

	"github.com/gotd/td/tg"
)

func TestManager_findPeerClass(t *testing.T) {
	user := getTestSelf()
	chat := &tg.Chat{
		ID: 10,
	}
	channel := &tg.Channel{
		ID: 10,
	}

	m := &Manager{}
	type args struct {
		p     tg.PeerClass
		users []tg.UserClass
		chats []tg.ChatClass
	}
	tests := []struct {
		name   string
		args   args
		want   Peer
		wantOk bool
	}{
		{
			name: "User",
			args: args{
				p:     &tg.PeerUser{UserID: user.GetID()},
				users: []tg.UserClass{user},
			},
			want: User{
				raw: user,
				m:   m,
			},
			wantOk: true,
		},
		{
			name: "Chat",
			args: args{
				p:     &tg.PeerChat{ChatID: 10},
				chats: []tg.ChatClass{chat},
			},
			want: Cha
    
func TestManager_Resolve(t *testing.T) {
	testUser := getTestSelf()
	inputs := []struct {
		Name  string
		Input string
	}{
		{"Domain", "@gotduser"},
		{"Deeplink", "https://t.me/gotduser"},
	}
	for _, tt := range inputs {
		t.Run(tt.Name, func(t *testing.T) {
			a := require.New(t)
			mock, m := testManager(t)

			username := "gotduser"
			mock.ExpectCall(&tg.ContactsResolveUsernameRequest{
				Username: username,
			}).ThenResult(&tg.ContactsResolvedPeer{
				Peer: &tg.PeerUser{UserID: testUser.GetID()},
				Users: []tg.UserClass{
					&tg.User{ID: testUser.GetID(), AccessHash: 10, Username: username},
				},
			}).ExpectCall(&tg.ContactsResolveUsernameRequest{
				Username: username,
			}).ThenRPCErr(getTestError())

			ctx := context.Background()

			r, err := m.Resolve(ctx, tt.Input)
			a.NoError(err)
			a.IsType(&tg.InputPeerUser{}, r.InputPeer())
			a.Equal(testUser.GetID(), r.ID())

			_, err = m.Resolve(ctx, tt.Input)
			a.Error(err)
		})
	}
}