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: handlers_test.go
    path of file: ./repos/magma/lte/cloud/go/services/lte/obsidian/handlers
    
    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 handlers_test

import (
	"context"
	"crypto/x509"
	"fmt"
	"testing"
	"time"

	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/labstack/echo/v4"
	"github.com/stretchr/testify/assert"

	"magma/lte/cloud/go/lte"
	"magma/lte/cloud/go/serdes"
	"magma/lte/cloud/go/services/lte/obsidian/handlers"
	lteModels "magma/lte/cloud/go/services/lte/obsidian/models"
	policyModels "magma/lte/cloud/go/services/policydb/obsidian/models"
	"magma/orc8r/cloud/go/clock"
	models2 "magma/orc8r/cloud/go/models"
	"magma/orc8r/cloud/go/orc8r"
	"magma/orc8r/cloud/go/serde"
	"magma/orc8r/cloud/go/services/configurator"
	configuratorTestInit "magma/orc8r/cloud/go/services/configurator/test_init"
	"magma/orc8r/cloud/go/services/device"
	deviceTestInit "magma/orc8r/cloud/go/services/device/test_init"
	"magma/orc8r/cloud/go/services/obsidian"
	"magma/orc8r/cloud/go/services/obsidian/tests"
	"magma/orc8r/cloud/go/services/orchestrator/obsidian/models"
	"magma/orc8r/cloud/go/services/state"
	stateTestInit "magma/orc8r/cloud/go/services/state/test_init"
	"magma/orc8r/cloud/go/services/state/test_utils"
	"magma/orc8r/cloud/go/storage"
	orc_test_utils "magma/orc8r/cloud/go/test_utils"
	"magma/orc8r/lib/go/protos"
	"magma/orc8r/lib/go/security/key"
)

func init() {
	// _ = flag.Set("logtostderr", "true") // uncomment to view logs during test
}

func TestListNetworks(t *testing.T) {
	configuratorTestInit.StartTestService(t)
	e := echo.New()

	obsidianHandlers := handlers.GetHand
    
func TestListAndGetEnodebs(t *testing.T) {
	configuratorTestInit.StartTestService(t)
	deviceTestInit.StartTestService(t)
	err := configurator.CreateNetwork(context.Background(), configurator.Network{ID: "n1"}, serdes.Network)
	assert.NoError(t, err)

	e := echo.New()
	testURLRoot := "/magma/v1/lte/:network_id/enodebs"

	handlers := handlers.GetHandlers()
	listEnodebs := tests.GetHandlerByPathAndMethod(t, handlers, testURLRoot, obsidian.GET).HandlerFunc
	getEnodeb := tests.GetHandlerByPathAndMethod(t, handlers, fmt.Sprintf("%s/:enodeb_serial", testURLRoot), obsidian.GET).HandlerFunc

	_, err = configurator.CreateEntities(context.Background(), "n1", []configurator.NetworkEntity{
		{
			Type:        lte.CellularEnodebEntityType,
			Key:         "abcdefg",
			Name:        "abc enodeb",
			Description: "abc enodeb description",
			PhysicalID:  "abcdefg",
			Config: &lteModels.EnodebConfig{
				ConfigType: "MANAGED",
				ManagedConfig: &lteModels.EnodebConfiguration{
					BandwidthMhz:           20,
					CellID:                 swag.Uint32(1234),
					DeviceClass:            "Baicells Nova-233 G2 OD FDD",
					Earfcndl:               39450,
					Pci:                    260,
					SpecialSubframePattern: 7,
					SubframeAssignment:     2,
					Tac:                    1,
					TransmitEnabled:        swag.Bool(true),
				},
			},
		},
		{
			Type:        lte.CellularEnodebEntityType,
			Key:         "vwxyz",
			Name:        "xyz enodeb",
			Description: "xyz enodeb description",
			PhysicalID:  "vwxyz",
			Config: &lteModels.EnodebConfig{
				ConfigType: "MANAGED",
				ManagedConfig: &lteModels.EnodebConfiguration{
					BandwidthMhz:           20,
					CellID:                 swag.Uint32(1234),
					DeviceClass:            "Baicells Nova-233 G2 OD FDD",
					Earfcndl:               39450,
					Pci:                    260,
					SpecialSubframePattern: 7,
					SubframeAssignment:     2,
					Tac:                    1,
					TransmitEnabled:        swag.Bool(true),
				},
			},
		},
		{
			Type: lte.CellularGatewayEntityType, Key: "gw1",
			Associations: storage.TKs{{Type: lte.CellularEnodebEntityType, Key: "abcdefg"}},
		},
	}, serdes.Entity)
	assert.NoError(t, err)

	enodebs := map[string]*lteModels.Enodeb{
		"abcdefg": {
			AttachedGatewayID: "gw1",
			Config: &lteModels.EnodebConfiguration{
				BandwidthMhz:           20,
				CellID:                 swag.Uint32(1234),
				DeviceClass:            "Baicells Nova-233 G2 OD FDD",
				Earfcndl:               39450,
				Pci:                    260,
				SpecialSubframePattern: 7,
				SubframeAssignment:     2,
				Tac:                    1,
				TransmitEnabled:        swag.Bool(true),
			},
			EnodebConfig: &lteModels.EnodebConfig{
				ConfigType: "MANAGED",
				ManagedConfig: &lteModels.EnodebConfiguration{
					BandwidthMhz:           20,
					CellID:                 swag.Uint32(1234),
					DeviceClass:            "Baicells Nova-233 G2 OD FDD",
					Earfcndl:               39450,
					Pci:                    260,
					SpecialSubframePattern: 7,
					SubframeAssignment:     2,
					Tac:                    1,
					TransmitEnabled:        swag.Bool(true),
				},
			},
			Name:        "abc enodeb",
			Description: "abc enodeb description",
			Serial:      "abcdefg",
		},
		"vwxyz": {
			Config: &lteModels.EnodebConfiguration{
				BandwidthMhz:           20,
				CellID:                 swag.Uint32(1234),
				DeviceClass:            "Baicells Nova-233 G2 OD FDD",
				Earfcndl:               39450,
				Pci:                    260,
				SpecialSubframePattern: 7,
				SubframeAssignment:     2,
				Tac:                    1,
				TransmitEnabled:        swag.Bool(true),
			},
			EnodebConfig: &lteModels.EnodebConfig{
				ConfigType: "MANAGED",
				ManagedConfig: &lteModels.EnodebConfiguration{
					BandwidthMhz:           20,
					CellID:                 swag.Uint32(1234),
					DeviceClass:            "Baicells Nova-233 G2 OD FDD",
					Earfcndl:               39450,
					Pci:                    260,
					SpecialSubframePattern: 7,
					SubframeAssignment:     2,
					Tac:                    1,
					TransmitEnabled:        swag.Bool(true),
				},
			},
			Name:        "xyz enodeb",
			Description: "xyz enodeb description",
			Serial:      "vwxyz",
		},
	}
	emptyPageToken := lteModels.PageToken("")
	expected := &lteModels.PaginatedEnodebs{
		Enodebs:    enodebs,
		PageToken:  &emptyPageToken,
		TotalCount: 2,
	}

	tc := tests.Test{
		Method:         "GET",
		URL:            testURLRoot,
		Handler:        listEnodebs,
		ParamNames:     []string{"network_id"},
		ParamValues:    []string{"n1"},
		ExpectedStatus: 200,
		ExpectedResult: tests.JSONMarshaler(expected),
	}
	tests.RunUnitTest(t, e, tc)

	expectedPageToken := lteModels.PageToken("CgdhYmNkZWZn")
	paginatedExpectation := &lteModels.PaginatedEnodebs{
		Enodebs:    map[string]*lteModels.Enodeb{"abcdefg": expected.Enodebs["abcdefg"]},
		PageToken:  &expectedPageToken,
		TotalCount: 2,
	}
	tc = tests.Test{
		Method:         "GET",
		URL:            testURLRoot + "?page_size=1&page_token=",
		Handler:        listEnodebs,
		ParamNames:     []string{"network_id"},
		ParamValues:    []string{"n1"},
		ExpectedStatus: 200,
		ExpectedResult: tests.JSONMarshaler(paginatedExpectation),
	}
	tests.RunUnitTest(t, e, tc)
	paginatedExpectation.Enodebs = map[string]*lteModels.Enodeb{"vwxyz": expected.Enodebs["vwxyz"]}
	paginatedExpectation.PageToken = &emptyPageToken

	tc = tests.Test{
		Method:         "GET",
		URL:            testURLRoot + "?page_size=10&page_token=" + string(expectedPageToken),
		Handler:        listEnodebs,
		ParamNames:     []string{"network_id"},
		ParamValues:    []string{"n1"},
		ExpectedStatus: 200,
		ExpectedResult: tests.JSONMarshaler(paginatedExpectation),
	}
	tests.RunUnitTest(t, e, tc)
	// Run a second time to confirm page token is deterministic
	tests.RunUnitTest(t, e, tc)

	tc = tests.Test{
		Method:         "GET",
		URL:            testURLRoot,
		Handler:        getEnodeb,
		ParamNames:     []string{"network_id", "enodeb_serial"},
		ParamValues:    []string{"n1", "abcdefg"},
		ExpectedStatus: 200,
		ExpectedResult: expected.Enodebs["abcdefg"],
	}
	tests.RunUnitTest(t, e, tc)

	tc = tests.Test{
		Method:         "GET",
		URL:            testURLRoot,
		Handler:        getEnodeb,
		ParamNames:     []string{"network_id", "enodeb_serial"},
		ParamValues:    []string{"n1", "vwxyz"},
		ExpectedStatus: 200,
		ExpectedResult: expected.Enodebs["vwxyz"],
	}
	tests.RunUnitTest(t, e, tc)

	tc = tests.Test{
		Method:         "GET",
		URL:            testURLRoot,
		Handler:        getEnodeb,
		ParamNames:     []string{"network_id", "enodeb_serial"},
		ParamValues:    []string{"n1", "hello"},
		ExpectedStatus: 404,
		ExpectedError:  "Not Found",
	}
	tests.RunUnitTest(t, e, tc)
}