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: grpc.go
    path of file: ./repos/cosmos-sdk/tests/e2e/authz
    
    the code of the file until where you have to start completion: package authz

import (
	"fmt"
	"time"

	"cosmossdk.io/math"
	"cosmossdk.io/x/authz"
	"cosmossdk.io/x/authz/client/cli"
	authzclitestutil "cosmossdk.io/x/authz/client/testutil"
	banktypes "cosmossdk.io/x/bank/types"

	"github.com/cosmos/cosmos-sdk/client/flags"
	"github.com/cosmos/cosmos-sdk/testutil"
	sdk "github.com/cosmos/cosmos-sdk/types"
)

func (s *E2ETestSuite) TestQueryGrantGRPC() {
	val := s.network.GetValidators()[0]
	grantee := s.grantee[1]
	grantsURL := val.GetAPIAddress() + "/cosmos/authz/v1beta1/grants?granter=%s&grantee=%s&msg_type_url=%s"
	testCases := []struct {
		name      string
		url       string
		expectErr bool
		errorMsg  string
	}{
		{
			"fail invalid granter address",
			fmt.Sprintf(grantsURL, "invalid_granter", grante
    
func (s *E2ETestSuite) TestQueryGranteeGrantsGRPC() {
	val := s.network.GetValidators()[0]
	grantee := s.grantee[1]
	require := s.Require()

	testCases := []struct {
		name      string
		url       string
		expectErr bool
		errMsg    string
		numItems  int
	}{
		{
			"invalid account address",
			fmt.Sprintf("%s/cosmos/authz/v1beta1/grants/grantee/%s", val.GetAPIAddress(), "invalid address"),
			true,
			"decoding bech32 failed",
			0,
		},
		{
			"no authorizations found",
			fmt.Sprintf("%s/cosmos/authz/v1beta1/grants/grantee/%s", val.GetAPIAddress(), val.GetAddress().String()),
			false,
			"",
			0,
		},
		{
			"valid query",
			fmt.Sprintf("%s/cosmos/authz/v1beta1/grants/grantee/%s", val.GetAPIAddress(), grantee.String()),
			false,
			"",
			1,
		},
	}
	for _, tc := range testCases {
		s.Run(tc.name, func() {
			resp, err := testutil.GetRequest(tc.url)
			require.NoError(err)

			if tc.expectErr {
				require.Contains(string(resp), tc.errMsg)
			} else {
				var authorizations authz.QueryGranteeGrantsResponse
				err := val.GetClientCtx().Codec.UnmarshalJSON(resp, &authorizations)
				require.NoError(err)
				require.Len(authorizations.Grants, tc.numItems)
			}
		})
	}
}