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: transport_test.go
    path of file: ./repos/cockroach/pkg/kv/kvclient/kvcoord
    
    the code of the file until where you have to start completion: // Copyright 2016 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.

package kvcoord

import (
	"context"
	"fmt"
	"testing"

	"github.com/cockroachdb/cockroach/pkg/kv/kvpb"
	"github.com/cockroachdb/cockroach/pkg/roachpb"
	"github.com/cockroachdb/cockroach/pkg/testutils"
	"github.com/cockroachdb/cockroach/pkg/util/caller"
	"github.com/cockroachdb/cockroach/pkg/util/leaktest"
	"github.com/cockroachdb/cockroach/pkg/util/log"
	"github.com/cockroachdb/cockroach/pkg/util/tracing"
	"github.com/cockroachdb/cockroach/pkg/util/tracing/tracingpb"
	"github.com/stretchr/testify/require"
	"google.golang.org/grpc"
)

func TestTransportMoveToFront(t *testing.T) {
	defer leaktest.AfterTest(t)()
	defer log.Scope(t).Close(t)
	rd1 := roachpb.ReplicaDescriptor{NodeID: 1, StoreID: 1, ReplicaID: 1}
	rd2 := roachp
    
func TestTransportReset(t *testing.T) {
	defer leaktest.AfterTest(t)()
	defer log.Scope(t).Close(t)

	rd1 := roachpb.ReplicaDescriptor{NodeID: 1, StoreID: 1, ReplicaID: 1}
	rd2 := roachpb.ReplicaDescriptor{NodeID: 2, StoreID: 2, ReplicaID: 2}
	rd3 := roachpb.ReplicaDescriptor{NodeID: 3, StoreID: 3, ReplicaID: 3}
	gt := grpcTransport{replicas: []roachpb.ReplicaDescriptor{rd1, rd2, rd3}}

	// Reset should be a noop when positioned at start.
	require.Equal(t, rd1, gt.NextReplica())
	gt.Reset()
	require.Equal(t, rd1, gt.NextReplica())

	// Reset should move back to front when in the middle.
	gt.SkipReplica()
	require.Equal(t, rd2, gt.NextReplica())
	gt.Reset()
	require.Equal(t, rd1, gt.NextReplica())

	// Reset should move back to front when exhausted.
	gt.SkipReplica()
	gt.SkipReplica()
	gt.SkipReplica()
	require.True(t, gt.IsExhausted())
	gt.Reset()
	require.False(t, gt.IsExhausted())
	require.Equal(t, rd1, gt.NextReplica())

	// MoveToFront will reorder replicas by moving the replica to the next index.
	// Reset moves to the start of the modified ordering.
	gt.SkipReplica()
	gt.SkipReplica()
	require.True(t, gt.MoveToFront(rd1))
	gt.Reset()
	require.Equal(t, rd2, gt.NextReplica())
	gt.SkipReplica()
	require.Equal(t, rd1, gt.NextReplica())
	gt.SkipReplica()
	require.Equal(t, rd3, gt.NextReplica())
	gt.SkipReplica()
	require.True(t, gt.IsExhausted())
}