[VOL-4737] Fixing unit tests.

Change-Id: I4738ba0a779a9b774693dcc8948371a85e576315
diff --git a/app/src/main/java/org/opencord/sadis/impl/package-info.java b/app/src/main/java/org/opencord/sadis/impl/package-info.java
index 76e060a..9eb7095 100644
--- a/app/src/main/java/org/opencord/sadis/impl/package-info.java
+++ b/app/src/main/java/org/opencord/sadis/impl/package-info.java
@@ -19,4 +19,4 @@
  * and make it available to other services / applications within the ONOS/CORD
  * infrastructure.
  */
-package org.opencord.sadis;
+package org.opencord.sadis.impl;
diff --git a/app/src/test/java/org/opencord/sadis/impl/BaseSadis.java b/app/src/test/java/org/opencord/sadis/impl/BaseSadis.java
index eba613b..ea5f056 100644
--- a/app/src/test/java/org/opencord/sadis/impl/BaseSadis.java
+++ b/app/src/test/java/org/opencord/sadis/impl/BaseSadis.java
@@ -65,6 +65,7 @@
     private static final int TECH_PROF_ID_2 = 65;
 
     private static final String HSA = "HSA";
+    private static final String HSIA = "HSIA";
     private static final String HSA_OLT = "HSA_OLT";
     private static final String IPTV = "IPTV";
     private static final String NAS_PORT_ID = "1/1/2";
@@ -109,6 +110,7 @@
     protected static final String ID4 = "4";
     protected static final String ID5 = "5";
     protected static final String ID6 = "6";
+    protected static final String EMPTY = "";
 
     UniTagInformation ttService1 = new UniTagInformation.Builder()
             .setUniTagMatch(VlanId.vlanId(UNI_TAG_MATCH_1))
@@ -121,7 +123,10 @@
             .setTechnologyProfileId(TECH_PROF_ID_1)
             .setUpstreamBandwidthProfile(HSA)
             .setDownstreamBandwidthProfile(HSA)
-            .setServiceName(HSA)
+            .setServiceName(HSIA)
+            .setConfiguredMacAddress(EMPTY)
+            .setUpstreamOltBandwidthProfile(HSA)
+            .setDownstreamOltBandwidthProfile(HSA)
             .build();
 
     UniTagInformation ttService2 = new UniTagInformation.Builder()
@@ -140,6 +145,8 @@
             .setIsDhcpRequired(true)
             .setEnableMacLearning(true)
             .setConfiguredMacAddress(MAC2)
+            .setUpstreamOltBandwidthProfile(IPTV)
+            .setDownstreamOltBandwidthProfile(IPTV)
             .build();
 
     UniTagInformation ttService3 = new UniTagInformation.Builder()
@@ -155,15 +162,21 @@
             .setDownstreamBandwidthProfile(HSA)
             .setUpstreamOltBandwidthProfile(HSA_OLT)
             .setDownstreamOltBandwidthProfile(HSA_OLT)
-            .setServiceName(HSA)
+            .setServiceName(HSIA)
+            .setConfiguredMacAddress(EMPTY)
             .build();
 
     UniTagInformation attService1 = new UniTagInformation.Builder()
+            .setServiceName(EMPTY)
             .setPonCTag(VlanId.vlanId(C_TAG_1))
             .setPonSTag(VlanId.vlanId(S_TAG_2))
             .setTechnologyProfileId(TECH_PROF_ID_1)
             .setUpstreamBandwidthProfile(HSA)
             .setDownstreamBandwidthProfile(HSA)
+            .setUniTagMatch(VlanId.vlanId(VlanId.NO_VID))
+            .setConfiguredMacAddress(EMPTY)
+            .setUpstreamOltBandwidthProfile(HSA)
+            .setDownstreamOltBandwidthProfile(HSA)
             .build();
 
     List<UniTagInformation> uniTagListForTT = Lists.newArrayList(ttService1);
diff --git a/app/src/test/java/org/opencord/sadis/impl/SubscriberAndDeviceManagerTest.java b/app/src/test/java/org/opencord/sadis/impl/SubscriberAndDeviceManagerTest.java
index d2bc07c..a781adb 100644
--- a/app/src/test/java/org/opencord/sadis/impl/SubscriberAndDeviceManagerTest.java
+++ b/app/src/test/java/org/opencord/sadis/impl/SubscriberAndDeviceManagerTest.java
@@ -141,7 +141,7 @@
 
     public boolean checkEquality(BaseInformation localEntry, BaseInformation entry) {
         SubscriberAndDeviceInformation sub = (SubscriberAndDeviceInformation) localEntry;
-        SubscriberAndDeviceInformation other = (SubscriberAndDeviceInformation) localEntry;
+        SubscriberAndDeviceInformation other = (SubscriberAndDeviceInformation) entry;
 
         if (other == null) {
             return false;
diff --git a/app/src/test/resources/3 b/app/src/test/resources/3
index 418b0b0..ff6cf66 100644
--- a/app/src/test/resources/3
+++ b/app/src/test/resources/3
@@ -16,7 +16,7 @@
      		"usPonCTagPriority":0,
      		"usPonSTagPriority":1,
      		"dsPonCTagPriority": 0,
-     		"dsPonSTagPriority": 0,
+     		"dsPonSTagPriority": 1,
      		"technologyProfileId":64,
      		"upstreamBandwidthProfile":"HSA",
      		"downstreamBandwidthProfile":"HSA",
diff --git a/app/src/test/resources/4 b/app/src/test/resources/4
index ea0b618..c308a94 100644
--- a/app/src/test/resources/4
+++ b/app/src/test/resources/4
@@ -16,7 +16,7 @@
       		"usPonCTagPriority":0,
       		"usPonSTagPriority":1,
       		"dsPonCTagPriority":0,
-      		"dsPonSTagPriority":0,
+      		"dsPonSTagPriority":1,
       		"technologyProfileId":64,
       		"upstreamBandwidthProfile":"HSA",
       		"downstreamBandwidthProfile":"HSA",
@@ -24,16 +24,20 @@
       	},
       	{
       		"uniTagMatch":200,
-      		"ponCTag":3,
-      		"ponSTag":2,
+      		"ponCTag":2,
+      		"ponSTag":3,
       		"usPonCTagPriority":0,
       		"usPonSTagPriority":1,
       		"dsPonCTagPriority":0,
-      		"dsPonSTagPriority":0,
+      		"dsPonSTagPriority":1,
       		"technologyProfileId":65,
       		"upstreamBandwidthProfile":"IPTV",
       		"downstreamBandwidthProfile":"IPTV",
-      		"serviceName":"IPTV"
-      	}
+      		"serviceName":"IPTV",
+      	    "isIgmpRequired": "true",
+            "isDhcpRequired": "true",
+      		"configuredMacAddress": "ff:aa:dd:cc:bb:ee",
+            "enableMacLearning": "true"
+        }
       ]
 }
diff --git a/app/src/test/resources/HybridSubConfig.json b/app/src/test/resources/HybridSubConfig.json
index e88a414..e6a7a5c 100644
--- a/app/src/test/resources/HybridSubConfig.json
+++ b/app/src/test/resources/HybridSubConfig.json
@@ -24,8 +24,8 @@
 			"uniTagList": [
 				{
 					"uniTagMatch":100,
-					"ponCTag":"2,",
-					"ponSTag":"2",
+					"ponCTag":2,
+					"ponSTag":2,
 					"usPonCTagPriority":0,
 					"usPonSTagPriority":1,
 					"dsPonCTagPriority":0,
@@ -51,8 +51,8 @@
 			"uniTagList": [
 				{
 					"uniTagMatch":100,
-					"ponCTag":"2,",
-					"ponSTag":"2",
+					"ponCTag":2,
+					"ponSTag":2,
 					"usPonCTagPriority":0,
 					"usPonSTagPriority":1,
 					"dsPonCTagPriority":0,
@@ -64,8 +64,8 @@
 				},
 				{
 					"uniTagMatch":200,
-					"ponCTag":3,
-					"ponSTag":2,
+					"ponCTag":2,
+					"ponSTag":3,
 					"usPonCTagPriority":0,
 					"usPonSTagPriority":1,
 					"dsPonCTagPriority": 0,
@@ -76,7 +76,8 @@
 					"serviceName":"IPTV",
 					"isIgmpRequired": "true",
 					"isDhcpRequired": "true",
-					"configuredMacAddress": "\"ff:aa:dd:cc:bb:ee\""
+					"configuredMacAddress": "ff:aa:dd:cc:bb:ee",
+					"enableMacLearning": "true"
 				}
 			]
 		}
diff --git a/app/src/test/resources/LocalSubConfig.json b/app/src/test/resources/LocalSubConfig.json
index 6eff750..377c98a 100644
--- a/app/src/test/resources/LocalSubConfig.json
+++ b/app/src/test/resources/LocalSubConfig.json
@@ -23,8 +23,8 @@
 			"uniTagList": [
 				{
 					"uniTagMatch":100,
-					"ponCTag":"2,",
-					"ponSTag":"2",
+					"ponCTag":2,
+					"ponSTag":2,
 					"usPonCTagPriority":0,
 					"usPonSTagPriority":1,
 					"dsPonCTagPriority":0,
@@ -50,8 +50,8 @@
 			"uniTagList": [
 				{
 					"uniTagMatch":100,
-					"ponCTag":"2,",
-					"ponSTag":"2",
+					"ponCTag":2,
+					"ponSTag":2,
 					"usPonCTagPriority":0,
 					"usPonSTagPriority":1,
 					"dsPonCTagPriority":0,
@@ -63,8 +63,8 @@
 				},
 				{
 					"uniTagMatch":200,
-					"ponCTag":3,
-					"ponSTag":2,
+					"ponCTag":2,
+					"ponSTag":3,
 					"usPonCTagPriority":0,
 					"usPonSTagPriority":1,
 					"dsPonCTagPriority": 0,
@@ -75,24 +75,25 @@
 					"serviceName":"IPTV",
 					"isIgmpRequired": "true",
 					"isDhcpRequired": "true",
-					"configuredMacAddress": "\"ff:aa:dd:cc:bb:ee\""
+					"configuredMacAddress": "ff:aa:dd:cc:bb:ee",
+					"enableMacLearning": "true"
 				}
 			]
 		},
 		{
 			"id": "5",
 			"nasPortId": "1/1/2",
-			"uplinkPort": 125,
-			"slot": 3,
-			"hardwareIdentifier": "aa:bb:cc:dd:ee:ff",
-			"ipAddress":"10.10.10.10",
-			"nasId":"XXX-NASID",
-			"circuitId":"circuit123",
-			"remoteId":"remote123",
+			"uplinkPort": 130,
+			"slot": 7,
+			"hardwareIdentifier": "ff:aa:dd:cc:bb:ee",
+			"ipAddress":"30.30.30.30",
+			"nasId":"MNO-NASID",
+			"circuitId":"circuit567",
+			"remoteId":"remote567",
 			"uniTagList": [
 				{
-					"ponCTag":"2,",
-					"ponSTag":"2",
+					"ponCTag":2,
+					"ponSTag":3,
 					"technologyProfileId":64,
 					"upstreamBandwidthProfile":"HSA",
 					"downstreamBandwidthProfile":"HSA"
@@ -102,22 +103,28 @@
 		{
 			"id": "6",
 			"nasPortId": "1/1/2",
-			"uplinkPort": 125,
-			"slot": 3,
-			"hardwareIdentifier": "aa:bb:cc:dd:ee:ff",
-			"ipAddress":"10.10.10.10",
-			"nasId":"XXX-NASID",
-			"circuitId":"circuit123",
-			"remoteId":"remote123",
+			"uplinkPort": 130,
+			"slot": 7,
+			"hardwareIdentifier": "ff:aa:dd:cc:bb:ee",
+			"ipAddress":"30.30.30.30",
+			"nasId":"MNO-NASID",
+			"circuitId":"circuit567",
+			"remoteId":"remote567",
 			"uniTagList": [
 				{
-					"ponCTag":"2,",
-					"ponSTag":"2",
+					"serviceName": "HSIA",
+					"uniTagMatch": "100",
+					"ponCTag":2,
+					"ponSTag":2,
 					"technologyProfileId":64,
 					"upstreamBandwidthProfile":"HSA",
 					"downstreamBandwidthProfile":"HSA",
 					"upstreamOltBandwidthProfile":"HSA_OLT",
-					"downstreamOltBandwidthProfile":"HSA_OLT"
+					"downstreamOltBandwidthProfile":"HSA_OLT",
+					"usPonCTagPriority":0,
+					"usPonSTagPriority":1,
+					"dsPonCTagPriority": 0,
+					"dsPonSTagPriority": 1
 				}
 			]
 		}