unit test and fix for mode switch

Change-Id: I6585adb2857a0ed16ceae605a7f763318c946136
diff --git a/app/src/test/resources/LocalConfig.json b/app/src/test/resources/LocalConfig.json
new file mode 100644
index 0000000..b855239
--- /dev/null
+++ b/app/src/test/resources/LocalConfig.json
@@ -0,0 +1,51 @@
+{
+	"integration":
+	{
+		"cache":
+		{
+			"enabled": true,
+			"maxsize": 50,
+			"ttl": "PT1m"
+		}
+	},
+
+	"entries":
+	[
+		{
+			"id": "1",
+			"cTag": 2,
+			"sTag": 2,
+			"nasPortId": "1/1/2",
+			"port": 125,
+			"slot": 3,
+			"hardwareIdentifier": "aa:bb:cc:dd:ee:ff",
+			"ipAddress":"10.10.10.10",
+			"nasId":"XXX-NASID",
+			"circuitId":"circuit123",
+			"remoteId":"remote123"
+		},
+
+		{
+			"id": "2",
+			"cTag": 4,
+			"sTag": 4,
+			"nasPortId": "1/1/2",
+			"port": 129,
+			"slot": 4,
+			"hardwareIdentifier": "aa:bb:cc:dd:ee:ff",
+			"ipAddress":"1.1.1.1",
+			"nasId":"YYY-NASID",
+			"circuitId":"circuit234",
+			"remoteId":"remote234"
+		},
+
+		{
+			"id": "cc:dd:ee:ff:aa:bb",
+			"hardwareIdentifier": "cc:dd:ee:ff:aa:bb",
+			"ipAddress":"12.12.12.12",
+			"nasId":"CCC-NASID",
+			"circuitId":"circuit345",
+                        "remoteId":"remote345"
+		}
+	]
+}