diff --git a/Makefile b/Makefile
index b41c5d9..591f6bb 100644
--- a/Makefile
+++ b/Makefile
@@ -43,8 +43,10 @@
 	--grpc-gateway_out=logtostderr=true:api \
 	 api/abstract_olt_api.proto
 
+api/xos.go:
+
 swagger:
-	protoc -I api/ \
+	@protoc -I api/ \
   -I${GOPATH}/src \
   -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
   --swagger_out=logtostderr=true:api \
@@ -63,6 +65,11 @@
 
 clean: ## Remove previous builds
 	@rm $(SERVER_OUT) $(CLIENT_OUT) $(API_OUT) $(API_REST_OUT) $(SWAGGER_OUT)
+	@rm -rf seba-api
+
+test: all
+	@go test ./...
+	@go test ./... -cover
 
 help: ## Display this help screen
 	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
diff --git a/api/handler.go b/api/handler.go
index ec7ce86..7414e19 100644
--- a/api/handler.go
+++ b/api/handler.go
@@ -42,25 +42,25 @@
 	phyChassisMap := models.GetPhyChassisMap()
 	absChassisMap := models.GetAbstractChassisMap()
 	clli := in.GetCLLI()
-
 	chassis := (*phyChassisMap)[clli]
 	if chassis != nil {
 		return &AddChassisReturn{DeviceID: chassis.CLLI}, nil
 	}
 	abstractChassis := abstract.GenerateChassis(clli)
-	phyChassis := physical.Chassis{CLLI: clli}
+	phyChassis := &physical.Chassis{CLLI: clli}
 	if settings.GetDebug() {
 		output := fmt.Sprintf("%v", abstractChassis)
 		formatted := strings.Replace(output, "{", "\n{", -1)
 		log.Printf("new chassis %s\n", formatted)
 	}
-	(*phyChassisMap)[clli] = &phyChassis
+	(*phyChassisMap)[clli] = phyChassis
+	fmt.Printf("phy %v, abs %v\n", phyChassisMap, absChassisMap)
 	(*absChassisMap)[clli] = abstractChassis
 	return &AddChassisReturn{DeviceID: clli}, nil
 }
 
 /*
-AddOLTChassis adds an OLT chassis/line card to the Physical chassis
+CreateOLTChassis adds an OLT chassis/line card to the Physical chassis
 */
 func (s *Server) CreateOLTChassis(ctx context.Context, in *AddOLTChassisMessage) (*AddOLTChassisReturn, error) {
 	fmt.Printf(" CreateOLTChassis %v \n", *in)
diff --git a/api/handler_test.go b/api/handler_test.go
new file mode 100644
index 0000000..6121242
--- /dev/null
+++ b/api/handler_test.go
@@ -0,0 +1,52 @@
+/*
+ Copyright 2017 the original author or authors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ 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 api_test
+
+import (
+	"fmt"
+	"testing"
+
+	"gerrit.opencord.org/abstract-olt/api"
+	"golang.org/x/net/context"
+)
+
+var clli string
+var ctx context.Context
+var server api.Server
+
+func TestHandler_CreateChassis(t *testing.T) {
+	fmt.Println("in handlerTest_CreateChassis")
+	ctx = context.Background()
+	server = api.Server{}
+	message := &api.AddChassisMessage{CLLI: "my cilli", VCoreIP: "192.168.0.1", VCorePort: 9191}
+	ret, err := server.CreateChassis(ctx, message)
+	if err != nil {
+		t.Fatalf("CreateChassis failed %v\n", err)
+	}
+	clli = ret.DeviceID
+
+}
+func TestHandler_CreateOLTChassis(t *testing.T) {
+	message := &api.AddOLTChassisMessage{CLLI: clli, SlotIP: "12.2.2.0", SlotPort: 9191,
+		Hostname: "SlotOne", Type: api.AddOLTChassisMessage_edgecore}
+	ret, err := server.CreateOLTChassis(ctx, message)
+	if err != nil {
+		t.Fatalf("CreateOLTChassis failed %v\n", err)
+	}
+	fmt.Printf("CreateOLTChassis success %v\n", ret)
+
+}
diff --git a/internal/pkg/settings/Settings_test.go b/internal/pkg/settings/Settings_test.go
new file mode 100644
index 0000000..ef8419f
--- /dev/null
+++ b/internal/pkg/settings/Settings_test.go
@@ -0,0 +1,30 @@
+/*
+ Copyright 2017 the original author or authors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ 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 settings_test
+
+import (
+	"testing"
+
+	"gerrit.opencord.org/abstract-olt/internal/pkg/settings"
+)
+
+func TestSettings_SetDebug(t *testing.T) {
+	settings.SetDebug(false)
+	if settings.GetDebug() {
+		t.Fatalf("Failed to set debug level")
+	}
+}
diff --git a/models/abstract/ChassisUtils_test.go b/models/abstract/ChassisUtils_test.go
new file mode 100644
index 0000000..ecc5752
--- /dev/null
+++ b/models/abstract/ChassisUtils_test.go
@@ -0,0 +1,39 @@
+/*
+ Copyright 2017 the original author or authors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ 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 abstract_test
+
+import (
+	"testing"
+
+	"gerrit.opencord.org/abstract-olt/models/abstract"
+)
+
+func TestChassisUtils_GenerateChassis(t *testing.T) {
+	chassis := abstract.GenerateChassis("MY_CLLI")
+	slot := chassis.Slots[6]
+	port := slot.Ports[0]
+	ont := port.Onts[3]
+	svlan := ont.Svlan
+	cvlan := ont.Cvlan
+	if svlan != 98 { // see map doc
+		t.Fail()
+	}
+	if cvlan != 434 { // see map doc
+		t.Fail()
+	}
+
+}
diff --git a/models/chassisMap.go b/models/chassisMap.go
index 30ae8e3..65e552d 100644
--- a/models/chassisMap.go
+++ b/models/chassisMap.go
@@ -17,25 +17,25 @@
 package models
 
 import (
-	"fmt"
+	"sync"
 
 	"gerrit.opencord.org/abstract-olt/models/abstract"
 	"gerrit.opencord.org/abstract-olt/models/physical"
 )
 
+var once sync.Once
+var absOnce sync.Once
 var chassisMap map[string]*physical.Chassis
-var abstractChassisMap map[string]*abstract.Chassis
+var aChassisMap map[string]*abstract.Chassis
 
 /*
 GetPhyChassisMap return the chassis map singleton
 */
 func GetPhyChassisMap() *map[string]*physical.Chassis {
-	if chassisMap == nil {
-		fmt.Println("chassisMap was nil")
+	// the go singleton pattern
+	once.Do(func() {
 		chassisMap = make(map[string]*physical.Chassis)
-
-	}
-	fmt.Printf("chassis map %v\n", chassisMap)
+	})
 	return &chassisMap
 }
 
@@ -43,11 +43,9 @@
 GetAbstractChassisMap return the chassis map singleton
 */
 func GetAbstractChassisMap() *map[string]*abstract.Chassis {
-	if abstractChassisMap == nil {
-		fmt.Println("chassisMap was nil")
-		abstractChassisMap = make(map[string]*abstract.Chassis)
-
-	}
-	fmt.Printf("chassis map %v\n", chassisMap)
-	return &abstractChassisMap
+	// the go singleton pattern
+	absOnce.Do(func() {
+		aChassisMap = make(map[string]*abstract.Chassis)
+	})
+	return &aChassisMap
 }
diff --git a/models/chassisMap_test.go b/models/chassisMap_test.go
new file mode 100644
index 0000000..7b30eeb
--- /dev/null
+++ b/models/chassisMap_test.go
@@ -0,0 +1,40 @@
+/*
+ Copyright 2017 the original author or authors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ 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 models_test
+
+import (
+	"testing"
+
+	"gerrit.opencord.org/abstract-olt/models"
+)
+
+func TestChassisMap_GetPhyChassisMap(t *testing.T) {
+	firstChassisMap := models.GetPhyChassisMap()
+	secondChassisMap := models.GetPhyChassisMap()
+
+	if firstChassisMap != secondChassisMap {
+		t.Fatalf("GetPhyChassisMap should always return pointer to same map")
+	}
+}
+func TestChassisMap_GetAbstractChassisMap(t *testing.T) {
+	firstChassisMap := models.GetAbstractChassisMap()
+	secondChassisMap := models.GetAbstractChassisMap()
+
+	if firstChassisMap != secondChassisMap {
+		t.Fatalf("GetPhyChassisMap should always return pointer to same map")
+	}
+}
diff --git a/models/physical/edgecore_test.go b/models/physical/edgecore_test.go
new file mode 100644
index 0000000..a7fbf68
--- /dev/null
+++ b/models/physical/edgecore_test.go
@@ -0,0 +1,41 @@
+/*
+ Copyright 2017 the original author or authors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ 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 physical_test
+
+import (
+	"net"
+	"testing"
+
+	"gerrit.opencord.org/abstract-olt/models/physical"
+)
+
+func TestPhysical_Edgecore(t *testing.T) {
+	clli := "test_clli"
+	chassis := physical.Chassis{CLLI: clli}
+	hostname := "my_name"
+	ip := "192.168.0.1"
+	port := 33
+	address := net.TCPAddr{IP: net.ParseIP(ip), Port: port}
+	parent := &chassis
+	switchPort := 3
+
+	olt := &physical.SimpleOLT{CLLI: clli, Hostname: hostname, Address: address, Parent: parent, DataSwitchPort: switchPort}
+	edgeCoreOlt := physical.CreateEdgecore(olt)
+	if edgeCoreOlt.GetCLLI() != clli {
+		t.Fatal("Failed to assign CLLI in CreateEdgecore")
+	}
+}
diff --git a/test/integration/serialize_test.go b/test/integration/serialize_test.go
index 9e8575f..fbc6932 100644
--- a/test/integration/serialize_test.go
+++ b/test/integration/serialize_test.go
@@ -17,7 +17,6 @@
 package integration
 
 import (
-	"net"
 	"testing"
 
 	"gerrit.opencord.org/abstract-olt/internal/pkg/chassisSerialize"
@@ -42,22 +41,19 @@
 }
 
 func generateTestChassis() *abstract.Chassis {
-	addr := net.TCPAddr{IP: net.IPv4(1, 2, 3, 4), Port: 500, Zone: "VCore ZONE"}
-	chassis := abstract.Chassis{VCoreAddress: addr, CLLI: "CLLI STRING"}
+	chassis := abstract.GenerateChassis("My_CLLI")
 
 	var slots [16]abstract.Slot
 	for i := 0; i < 16; i++ {
-		slots[i] = generateTestSlot(i, &chassis)
+		slots[i] = generateTestSlot(i, chassis)
 	}
 
 	chassis.Slots = slots
-	return &chassis
+	return chassis
 }
 
 func generateTestSlot(n int, c *abstract.Chassis) abstract.Slot {
-	addr := net.TCPAddr{IP: net.IPv4(1, 2, 3, byte(n)), Port: 400 + n, Zone: "Slot " + string(n) + "Zone"}
-	slot := abstract.Slot{DeviceID: "Device Slot " + string(n), Hostname: "Host " + string(n),
-		Address: addr, Number: n, Parent: c}
+	slot := abstract.Slot{Number: n, Parent: c}
 
 	var ports [16]abstract.Port
 	for i := 0; i < 16; i++ {
@@ -69,7 +65,7 @@
 }
 
 func generateTestPort(n int, s *abstract.Slot) abstract.Port {
-	port := abstract.Port{Number: n, DeviceID: "Device Port " + string(n), Parent: s}
+	port := abstract.Port{Number: n, Parent: s}
 
 	var onts [64]abstract.Ont
 	for i := 0; i < 64; i++ {
