diff --git a/app/src/test/java/org/opencord/aaa/impl/AaaStatisticsTest.java b/app/src/test/java/org/opencord/aaa/impl/AaaStatisticsTest.java
index c9564b0..25b8fc8 100644
--- a/app/src/test/java/org/opencord/aaa/impl/AaaStatisticsTest.java
+++ b/app/src/test/java/org/opencord/aaa/impl/AaaStatisticsTest.java
@@ -582,20 +582,32 @@
     }
 
     /*
-     * Mock implementation of SocketBasedRadiusCommunicator class.
-     *
-     */
+    * Mock implementation of SocketBasedRadiusCommunicator class.
+    *
+    */
     class TestSocketBasedRadiusCommunicator extends SocketBasedRadiusCommunicator {
 
         TestSocketBasedRadiusCommunicator(ApplicationId appId, PacketService pktService, AaaManager aaaManager) {
             super(appId, pktService, aaaManager);
         }
 
+        /**
+        * Wait 10 millis to simulate a non 0 rtt.
+        *
+        * @throws InterruptedException
+        */
+        private void waitPacket() throws InterruptedException {
+            synchronized (this) {
+                this.wait(10);
+            }
+        }
+
         // Implementation of socketBasedRadiusCommunicator--> run() method
         public void handlePacketFromServer(PacketContext context) {
-
             RADIUS incomingPkt = (RADIUS) fetchPacket(savedPackets.size() - 1);
             try {
+                // wait a couple of millis to avoid rtt being 0
+                waitPacket();
                 if (context == null) {
                     aaaStatisticsManager.handleRoundtripTime(incomingPkt.getIdentifier());
                     aaaManager.handleRadiusPacket(incomingPkt);
@@ -610,6 +622,8 @@
                 aaaManager.aaaStatisticsManager.getAaaStats().increaseMalformedResponsesRx();
                 aaaStatisticsManager.getAaaStats().countDroppedResponsesRx();
                 log.error("Cannot deserialize packet", dex);
+            } catch (InterruptedException inte) {
+                Thread.currentThread().interrupt();
             }
         }
 
diff --git a/app/src/test/java/org/opencord/aaa/impl/AaaTestBase.java b/app/src/test/java/org/opencord/aaa/impl/AaaTestBase.java
index d2bbeb1..ec4e113 100644
--- a/app/src/test/java/org/opencord/aaa/impl/AaaTestBase.java
+++ b/app/src/test/java/org/opencord/aaa/impl/AaaTestBase.java
@@ -16,6 +16,7 @@
 package org.opencord.aaa.impl;
 
 import com.google.common.base.Charsets;
+import com.google.common.collect.Lists;
 import org.onlab.packet.BasePacket;
 import org.onlab.packet.EAP;
 import org.onlab.packet.EAPOL;
@@ -45,6 +46,7 @@
 import org.opencord.sadis.BaseInformationService;
 import org.opencord.sadis.SadisService;
 import org.opencord.sadis.SubscriberAndDeviceInformation;
+import org.opencord.sadis.UniTagInformation;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
@@ -217,15 +219,29 @@
 
     private class MockSubscriberAndDeviceInformation extends SubscriberAndDeviceInformation {
 
-        MockSubscriberAndDeviceInformation(String id, VlanId ctag,
-                                           VlanId stag, String nasPortId,
-                                           String circuitId, MacAddress hardId,
+        MockSubscriberAndDeviceInformation(String id, VlanId uniTagMatch, VlanId ctag,
+                                           VlanId stag, int dsPonPrio, int upPonPrio,
+                                           int techProfileId, String dsBpId, String usBpId,
+                                           String nasPortId, String circuitId, MacAddress hardId,
                                            Ip4Address ipAddress) {
+            // Builds UniTagInformation
+            UniTagInformation.Builder tagInfoBuilder = new UniTagInformation.Builder();
+            UniTagInformation uniTagInfo = tagInfoBuilder.setUniTagMatch(uniTagMatch)
+                    .setPonCTag(ctag)
+                    .setPonSTag(stag)
+                    .setDsPonCTagPriority(dsPonPrio)
+                    .setUsPonSTagPriority(upPonPrio)
+                    .setTechnologyProfileId(techProfileId)
+                    .setDownstreamBandwidthProfile(dsBpId)
+                    .setUpstreamBandwidthProfile(usBpId)
+                    .build();
+
             this.setHardwareIdentifier(hardId);
             this.setId(id);
             this.setIPAddress(ipAddress);
             this.setNasPortId(nasPortId);
             this.setCircuitId(circuitId);
+            this.setUniTagList(Lists.newArrayList(uniTagInfo));
         }
     }
 
@@ -292,14 +308,24 @@
 }
 
     final class MockSubService implements BaseInformationService<SubscriberAndDeviceInformation> {
+        private final VlanId uniTagMatch = VlanId.vlanId((short) 35);
         private final VlanId clientCtag = VlanId.vlanId((short) 999);
         private final VlanId clientStag = VlanId.vlanId((short) 111);
+        private final int dsPrio = 0;
+        private final int usPrio = 0;
+        private final int techProfileId = 64;
+        private final String usBpId = "HSIA-US";
+        private final String dsBpId = "HSIA-DS";
         private final String clientNasPortId = "PON 1/1";
         private final String clientCircuitId = "CIR-PON 1/1";
 
+
         MockSubscriberAndDeviceInformation sub =
-                new MockSubscriberAndDeviceInformation(clientNasPortId, clientCtag,
-                        clientStag, clientNasPortId, clientCircuitId, null, null);
+                new MockSubscriberAndDeviceInformation(clientNasPortId, uniTagMatch, clientCtag,
+                                                       clientStag, dsPrio, usPrio,
+                                                       techProfileId, dsBpId, usBpId,
+                                                       clientNasPortId, clientCircuitId, null,
+                                                       null);
         @Override
         public SubscriberAndDeviceInformation get(String id) {
 
