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: emulator_cosmos_global_endpoint_manager_test.go
    path of file: ./repos/azure-sdk-for-go/sdk/data/azcosmos
    
    the code of the file until where you have to start completion: // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package azcosmos

import (
	"context"
	"net/url"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
)

func TestGlobalEndpointManagerEmulator(t *testing.T) {
	emulatorTests := newEmulatorTests(t)
	client := emulatorTests.getClient(t)
	emulatorRegionName := "South Central US"
	preferredRegions := []string
    
func TestGlobalEndpointManagerPolicyEmulator(t *testing.T) {
	emulatorTests := newEmulatorTests(t)
	client := emulatorTests.getClient(t)
	emulatorRegionName := "South Central US"

	// Assert location cache is not populated until update() is called within the policy
	locationInfo := client.gem.locationCache.locationInfo
	availableLocation := []string{}
	availableEndpointsByLocation := map[string]url.URL{}

	assert.Equal(t, locationInfo.availReadLocations, availableLocation)
	assert.Equal(t, locationInfo.availWriteLocations, availableLocation)
	assert.Equal(t, locationInfo.availReadEndpointsByLocation, availableEndpointsByLocation)
	assert.Equal(t, locationInfo.availWriteEndpointsByLocation, availableEndpointsByLocation)

	// Assert that information gets populated by the gem policy after running an http request (read item)
	db, _ := client.NewDatabase("database_id")
	container, _ := db.NewContainer("container_id")
	_, err := container.ReadItem(context.TODO(), NewPartitionKeyString("1"), "doc1", nil)
	assert.Error(t, err)

	locationInfo = client.gem.locationCache.locationInfo

	assert.Equal(t, len(locationInfo.availReadLocations), len(availableLocation)+1)
	assert.Equal(t, len(locationInfo.availWriteLocations), len(availableLocation)+1)
	assert.Equal(t, locationInfo.availWriteLocations[0], emulatorRegionName)
	assert.Equal(t, locationInfo.availReadLocations[0], emulatorRegionName)
	assert.Equal(t, len(locationInfo.availReadEndpointsByLocation), len(availableEndpointsByLocation)+1)
	assert.Equal(t, len(locationInfo.availWriteEndpointsByLocation), len(availableEndpointsByLocation)+1)
}