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: session_controller_test.go
    path of file: ./repos/magma/feg/gateway/services/session_proxy/servicers
    
    the code of the file until where you have to start completion: /*
Copyright 2020 The Magma Authors.

This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package servicers_test

import (
	"context"
	"fmt"
	"testing"
	"time"

	"github.com/golang/protobuf/ptypes/timestamp"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/mock"
	"github.com/thoas/go-funk"

	fegprotos "magma/feg/cloud/go/protos"
	"magma/feg/gateway/diameter"
	"magma/feg/gateway/multiplex"
	"magma/feg/gateway/policydb"
	mockPolicyDB "magma/feg/gateway/policydb/mocks"
	"magma/feg/gateway/services/session_proxy/credit_control"
	"magma/feg/gateway/services/session_proxy/credit_control/gx"
	mockGx "magma/feg/gateway/services/session_proxy/credit_control/gx/mocks"
	"magma/feg/gateway/services/session_proxy/credit_control/gy"
	mockGy "magma/feg/gateway/services/session_proxy/credit_control/gy/mocks"
	"magma/feg/gateway/services/session_proxy/servicers"
	"magma/gateway/mconfig"
	"magma/lte/cloud/go/protos"
	"magma/orc8r/cloud/go/test_utils"
	orcprotos "magma/orc8r/lib/go/protos"
)

const (
	IMSI1          = "IMSI00101"
	IMSI2          = "IMSI00102"
	IMSI1_NOPREFIX = "00101"
	IMSI2_NOPREFIX = "00102"
	IMSI1_uint64   = uint64(101)
	IMSI2_uint64   = uint64(102)
	NUMBER_SERVERS = 5 // Must be always bigger or equal to num of imsis
)

var (
	imsis          = []string{IMSI1, IMSI2}
	imsis_noprefix = []string{IMSI1_NOPREFIX, IMSI2_NOPREFIX}
	ismis_uint64   = []uint64{IMSI1_uint64, IMSI2_uint64}
	// as many ports as servers
	ocs_server_ports      = []string{"3869", "3870", "3871", "3872", "3873"}
	pcrf_server_ports     = []string{"3879", "3880", "3881", "3882", "3883"}
	initialRequestedUnits = &prot
    
func TestSessionControllerUseGyForAuthOnlyNoRatingGroup(t *testing.T) {
	// Set up mocks
	mockConfig := getTestConfig()
	mockControlParams := getMockControllerParams(mockConfig)
	mockPolicyDBClient := &mockPolicyDB.PolicyDBClient{}
	mockMux := getMockMultiplexor(NUMBER_SERVERS)

	// Get the controller for this imsi
	idx, err := mockMux.GetIndex(multiplex.NewContext().WithIMSI(IMSI1))
	assert.NoError(t, err)
	mocksGx := mockControlParams[idx].PolicyClient.(*mockGx.PolicyClient)
	mocksGy := mockControlParams[idx].CreditClient.(*mockGy.CreditClient)
	mockConfig[idx].UseGyForAuthOnly = true

	// Send back DIAMETER_SUCCESS (2001) from gx
	mocksGx.On("SendCreditControlRequest", mock.Anything, mock.Anything,
		mock.MatchedBy(getGxCCRMatcher(IMSI1_NOPREFIX, credit_control.CRTInit)),
	).Return(nil).Run(func(args mock.Arguments) {
		done := args.Get(1).(chan interface{})
		request := args.Get(2).(*gx.CreditControlRequest)

		ruleInstalls := []*gx.RuleInstallAVP{
			{
				RuleNames:       []string{"static_rule_1"},
				RuleDefinitions: []*gx.RuleDefinition{},
			},
		}

		done <- &gx.CreditControlAnswer{
			ResultCode:     uint32(diameter.SuccessCode),
			SessionID:      request.SessionID,
			RequestNumber:  request.RequestNumber,
			RuleInstallAVP: ruleInstalls,
		}
	}).Once()

	mockPolicyDBClient.On("GetChargingKeysForRules", mock.Anything, mock.Anything).Return(
		[]policydb.ChargingKey{}, nil).Once()
	// no omnipresent rule
	mockPolicyDBClient.On("GetOmnipresentRules").Return([]string{}, []string{}).Once()
	mockPolicyDBClient.On("GetRuleIDsForBaseNames", mock.Anything).Return([]string{}).Once()

	// Even if there are no rating groups, gy CCR-I will be called.
	mocksGy.On(
		"SendCreditControlRequest",
		mock.Anything,
		mock.Anything,
		mock.MatchedBy(getGyCCRMatcher(IMSI1_NOPREFIX, credit_control.CRTInit)),
	).Return(nil).Run(returnGySuccessNoRatingGroup).Once()

	srv := servicers.NewCentralSessionControllers(mockControlParams, mockPolicyDBClient, mockMux)
	ctx := context.Background()
	_, err = srv.CreateSession(ctx, &protos.CreateSessionRequest{
		SessionId:      genSessionID(IMSI1),
		RequestedUnits: initialRequestedUnits,
		CommonContext: &protos.CommonSessionContext{
			Sid: &protos.SubscriberID{
				Id: IMSI1,
			},
		},
	})
	mocksGx.AssertExpectations(t)
	assert.NoError(t, err)
}