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: cosmos_location_cache_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 (
	"fmt"
	"net/url"
	"os"
	"testing"
	"time"
)

var defaultEndpoint *url.URL
var loc1Endpoint *url.URL
var loc2Endpoint *url.URL
var loc3Endpoint *url.URL
var loc4Endpoint *url.URL
var writeEndpoints []url.URL
var readEndpoints []url.URL
var endpointsByLoc map[string]url.URL
var loc1 accountRegion
var loc2 accountRegion
var loc3 accountRegion
var loc4 accountRegion
var prefLocs []string

func TestMain(m *testing.M) {
	var err error
	defaultEndpoint, err = url.Parse("https://default.documents.azure.com")
	if err != nil {
		fmt.Println("Unable to parse default endpoint URI")
		os.Exit(1)
	}
	loc1Endpoint, err = url.Parse("https://location1.documents.azure.com")
	if err != nil {
		fmt.Println("Unable to parse location1 endpoint URI")
		os.Exit(1)
	}
	loc2Endpoint, err = url.Parse("https://location2.documents.azure.com")
	if err != nil {
		fmt.Println("Unable to parse location2 endpoint URI")
		os.Exit(1)
	}
	loc3Endpoint, err = url.Parse("https://location3.documents.azure.com")
	if err != nil {
		fmt.Println("Unable to parse location3 endpoint URI")
		os.Exit(1)
	}
	loc4Endpoint, err = url.Parse("https://location4.documents.azure.com")
	if err != nil {
		fmt.Println("Unable to parse location4 endpoint URI")
		os.Exit(1)
	}

	loc1 = accountRegion{Name: "location1", Endpoint: loc1Endpoint.String()}
	loc2 
    
func TestMain(m *testing.M) {
	var err error
	defaultEndpoint, err = url.Parse("https://default.documents.azure.com")
	if err != nil {
		fmt.Println("Unable to parse default endpoint URI")
		os.Exit(1)
	}
	loc1Endpoint, err = url.Parse("https://location1.documents.azure.com")
	if err != nil {
		fmt.Println("Unable to parse location1 endpoint URI")
		os.Exit(1)
	}
	loc2Endpoint, err = url.Parse("https://location2.documents.azure.com")
	if err != nil {
		fmt.Println("Unable to parse location2 endpoint URI")
		os.Exit(1)
	}
	loc3Endpoint, err = url.Parse("https://location3.documents.azure.com")
	if err != nil {
		fmt.Println("Unable to parse location3 endpoint URI")
		os.Exit(1)
	}
	loc4Endpoint, err = url.Parse("https://location4.documents.azure.com")
	if err != nil {
		fmt.Println("Unable to parse location4 endpoint URI")
		os.Exit(1)
	}

	loc1 = accountRegion{Name: "location1", Endpoint: loc1Endpoint.String()}
	loc2 = accountRegion{Name: "location2", Endpoint: loc2Endpoint.String()}
	loc3 = accountRegion{Name: "location3", Endpoint: loc3Endpoint.String()}
	loc4 = accountRegion{Name: "location4", Endpoint: loc4Endpoint.String()}

	writeEndpoints = []url.URL{*loc1Endpoint, *loc2Endpoint, *loc3Endpoint}
	readEndpoints = []url.URL{*loc1Endpoint, *loc2Endpoint, *loc4Endpoint}
	endpointsByLoc = map[string]url.URL{"location1": *loc1Endpoint, "location2": *loc2Endpoint, "location3": *loc3Endpoint, "location4": *loc4Endpoint}

	prefLocs = make([]string, 0)

	status := m.Run()
	os.Exit(status)
}