diff --git a/apps/sdnip/src/test/java/org/onosproject/sdnip/IntentSyncTest.java b/apps/sdnip/src/test/java/org/onosproject/sdnip/IntentSyncTest.java
index 5edab7c..0868582 100644
--- a/apps/sdnip/src/test/java/org/onosproject/sdnip/IntentSyncTest.java
+++ b/apps/sdnip/src/test/java/org/onosproject/sdnip/IntentSyncTest.java
@@ -61,8 +61,8 @@
 import org.onosproject.sdnip.config.Interface;
 import org.onlab.packet.Ethernet;
 import org.onlab.packet.IpAddress;
-import org.onlab.packet.Ip4Address;
 import org.onlab.packet.IpPrefix;
+import org.onlab.packet.Ip4Address;
 import org.onlab.packet.Ip4Prefix;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
@@ -308,10 +308,10 @@
                      routeEntry6);
         ribTable.put(RouteEntry.createBinaryString(routeEntry7.prefix()),
                      routeEntry7);
-        TestUtils.setField(router, "ribTable", ribTable);
+        TestUtils.setField(router, "ribTable4", ribTable);
 
-        ConcurrentHashMap<Ip4Prefix, MultiPointToSinglePointIntent>
-        routeIntents =  new ConcurrentHashMap<>();
+        ConcurrentHashMap<IpPrefix, MultiPointToSinglePointIntent>
+            routeIntents =  new ConcurrentHashMap<>();
         routeIntents.put(routeEntry1.prefix(), intent1);
         routeIntents.put(routeEntry3.prefix(), intent3);
         routeIntents.put(routeEntry4Update.prefix(), intent4Update);
@@ -364,12 +364,12 @@
         intentSynchronizer.synchronizeIntents();
 
         // Verify
-        assertEquals(router.getRoutes().size(), 6);
-        assertTrue(router.getRoutes().contains(routeEntry1));
-        assertTrue(router.getRoutes().contains(routeEntry3));
-        assertTrue(router.getRoutes().contains(routeEntry4Update));
-        assertTrue(router.getRoutes().contains(routeEntry5));
-        assertTrue(router.getRoutes().contains(routeEntry6));
+        assertEquals(router.getRoutes4().size(), 6);
+        assertTrue(router.getRoutes4().contains(routeEntry1));
+        assertTrue(router.getRoutes4().contains(routeEntry3));
+        assertTrue(router.getRoutes4().contains(routeEntry4Update));
+        assertTrue(router.getRoutes4().contains(routeEntry5));
+        assertTrue(router.getRoutes4().contains(routeEntry6));
 
         assertEquals(intentSynchronizer.getRouteIntents().size(), 6);
         assertTrue(intentSynchronizer.getRouteIntents().contains(intent1));
@@ -390,12 +390,17 @@
      * @param egressPoint to which packets should be sent
      * @return the constructed MultiPointToSinglePointIntent
      */
-    private MultiPointToSinglePointIntent intentBuilder(Ip4Prefix ipPrefix,
+    private MultiPointToSinglePointIntent intentBuilder(IpPrefix ipPrefix,
             String nextHopMacAddress, ConnectPoint egressPoint) {
 
         TrafficSelector.Builder selectorBuilder =
                 DefaultTrafficSelector.builder();
-        selectorBuilder.matchEthType(Ethernet.TYPE_IPV4).matchIPDst(ipPrefix);
+        if (ipPrefix.version() == Ip4Address.VERSION) {
+            selectorBuilder.matchEthType(Ethernet.TYPE_IPV4);   // IPv4
+        } else {
+            selectorBuilder.matchEthType(Ethernet.TYPE_IPV6);   // IPv6
+        }
+        selectorBuilder.matchIPDst(ipPrefix);
 
         TrafficTreatment.Builder treatmentBuilder =
                 DefaultTrafficTreatment.builder();
diff --git a/apps/sdnip/src/test/java/org/onosproject/sdnip/RouterAsyncArpTest.java b/apps/sdnip/src/test/java/org/onosproject/sdnip/RouterAsyncArpTest.java
index 4d3ad90..f8db770 100644
--- a/apps/sdnip/src/test/java/org/onosproject/sdnip/RouterAsyncArpTest.java
+++ b/apps/sdnip/src/test/java/org/onosproject/sdnip/RouterAsyncArpTest.java
@@ -63,8 +63,8 @@
 import org.onosproject.sdnip.config.SdnIpConfigurationService;
 import org.onlab.packet.Ethernet;
 import org.onlab.packet.IpAddress;
-import org.onlab.packet.Ip4Address;
 import org.onlab.packet.IpPrefix;
+import org.onlab.packet.Ip4Address;
 import org.onlab.packet.Ip4Prefix;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
@@ -239,8 +239,8 @@
                 new HostEvent(HostEvent.Type.HOST_ADDED, host));
 
         // Verify
-        assertEquals(router.getRoutes().size(), 1);
-        assertTrue(router.getRoutes().contains(routeEntry));
+        assertEquals(router.getRoutes4().size(), 1);
+        assertTrue(router.getRoutes4().contains(routeEntry));
         assertEquals(intentSynchronizer.getRouteIntents().size(), 1);
         Intent firstIntent =
             intentSynchronizer.getRouteIntents().iterator().next();
@@ -333,8 +333,8 @@
                 new HostEvent(HostEvent.Type.HOST_ADDED, host));
 
         // Verify
-        assertEquals(router.getRoutes().size(), 1);
-        assertTrue(router.getRoutes().contains(routeEntryUpdate));
+        assertEquals(router.getRoutes4().size(), 1);
+        assertTrue(router.getRoutes4().contains(routeEntryUpdate));
         assertEquals(intentSynchronizer.getRouteIntents().size(), 1);
         Intent firstIntent =
             intentSynchronizer.getRouteIntents().iterator().next();
@@ -380,7 +380,7 @@
         router.processRouteUpdates(Collections.<RouteUpdate>singletonList(routeUpdate));
 
         // Verify
-        assertEquals(router.getRoutes().size(), 0);
+        assertEquals(router.getRoutes4().size(), 0);
         assertEquals(intentSynchronizer.getRouteIntents().size(), 0);
         verify(intentService);
     }
@@ -424,7 +424,7 @@
                 new DefaultByteArrayNodeFactory());
         ribTable.put(RouteEntry.createBinaryString(routeEntry.prefix()),
                      routeEntry);
-        TestUtils.setField(router, "ribTable", ribTable);
+        TestUtils.setField(router, "ribTable4", ribTable);
     }
 
     /**
@@ -436,7 +436,7 @@
             MultiPointToSinglePointIntent intent)
             throws TestUtilsException {
 
-        ConcurrentHashMap<Ip4Prefix, MultiPointToSinglePointIntent>
+        ConcurrentHashMap<IpPrefix, MultiPointToSinglePointIntent>
             routeIntents =  new ConcurrentHashMap<>();
         routeIntents.put(routeEntry.prefix(), intent);
         TestUtils.setField(intentSynchronizer, "routeIntents", routeIntents);
diff --git a/apps/sdnip/src/test/java/org/onosproject/sdnip/RouterTest.java b/apps/sdnip/src/test/java/org/onosproject/sdnip/RouterTest.java
index 6ef4a20..9ef1f69 100644
--- a/apps/sdnip/src/test/java/org/onosproject/sdnip/RouterTest.java
+++ b/apps/sdnip/src/test/java/org/onosproject/sdnip/RouterTest.java
@@ -36,10 +36,10 @@
 import org.onlab.junit.TestUtils;
 import org.onlab.junit.TestUtils.TestUtilsException;
 import org.onlab.packet.Ethernet;
-import org.onlab.packet.Ip4Address;
-import org.onlab.packet.Ip4Prefix;
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.IpPrefix;
+import org.onlab.packet.Ip4Address;
+import org.onlab.packet.Ip4Prefix;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
 import org.onosproject.core.ApplicationId;
@@ -278,8 +278,8 @@
         router.processRouteUpdates(Collections.<RouteUpdate>singletonList(routeUpdate));
 
         // Verify
-        assertEquals(router.getRoutes().size(), 1);
-        assertTrue(router.getRoutes().contains(routeEntry));
+        assertEquals(router.getRoutes4().size(), 1);
+        assertTrue(router.getRoutes4().contains(routeEntry));
         assertEquals(intentSynchronizer.getRouteIntents().size(), 1);
         Intent firstIntent =
             intentSynchronizer.getRouteIntents().iterator().next();
@@ -349,8 +349,8 @@
         router.processRouteUpdates(Collections.<RouteUpdate>singletonList(routeUpdate));
 
         // Verify
-        assertEquals(router.getRoutes().size(), 1);
-        assertTrue(router.getRoutes().contains(routeEntryUpdate));
+        assertEquals(router.getRoutes4().size(), 1);
+        assertTrue(router.getRoutes4().contains(routeEntryUpdate));
         assertEquals(intentSynchronizer.getRouteIntents().size(), 1);
         Intent firstIntent =
             intentSynchronizer.getRouteIntents().iterator().next();
@@ -393,7 +393,7 @@
         router.processRouteUpdates(Collections.<RouteUpdate>singletonList(routeUpdate));
 
         // Verify
-        assertEquals(router.getRoutes().size(), 0);
+        assertEquals(router.getRoutes4().size(), 0);
         assertEquals(intentSynchronizer.getRouteIntents().size(), 0);
         verify(intentService);
     }
@@ -422,8 +422,8 @@
         router.processRouteUpdates(Collections.<RouteUpdate>singletonList(routeUpdate));
 
         // Verify
-        assertEquals(router.getRoutes().size(), 1);
-        assertTrue(router.getRoutes().contains(routeEntry));
+        assertEquals(router.getRoutes4().size(), 1);
+        assertTrue(router.getRoutes4().contains(routeEntry));
         assertEquals(intentSynchronizer.getRouteIntents().size(), 0);
         verify(intentService);
     }
diff --git a/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpTest.java b/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpTest.java
index 06e77dc..0100c39 100644
--- a/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpTest.java
+++ b/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpTest.java
@@ -59,10 +59,10 @@
 import org.onosproject.sdnip.config.Interface;
 import org.onosproject.sdnip.config.SdnIpConfigurationService;
 import org.onlab.packet.Ethernet;
-import org.onlab.packet.Ip4Address;
-import org.onlab.packet.Ip4Prefix;
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.IpPrefix;
+import org.onlab.packet.Ip4Address;
+import org.onlab.packet.Ip4Prefix;
 import org.onlab.packet.MacAddress;
 
 import com.google.common.collect.Sets;
@@ -226,7 +226,7 @@
         reset(intentService);
 
         for (RouteUpdate update : routeUpdates) {
-            Ip4Address nextHopAddress = update.routeEntry().nextHop();
+            IpAddress nextHopAddress = update.routeEntry().nextHop();
 
             // Find out the egress ConnectPoint
             ConnectPoint egressConnectPoint = getConnectPoint(nextHopAddress);
@@ -255,7 +255,7 @@
 
         latch.await(5000, TimeUnit.MILLISECONDS);
 
-        assertEquals(router.getRoutes().size(), numRoutes);
+        assertEquals(router.getRoutes4().size(), numRoutes);
         assertEquals(intentSynchronizer.getRouteIntents().size(),
                      numRoutes);
 
@@ -286,7 +286,7 @@
         reset(intentService);
 
         for (RouteUpdate update : routeUpdates) {
-            Ip4Address nextHopAddress = update.routeEntry().nextHop();
+            IpAddress nextHopAddress = update.routeEntry().nextHop();
 
             // Find out the egress ConnectPoint
             ConnectPoint egressConnectPoint = getConnectPoint(nextHopAddress);
@@ -333,7 +333,7 @@
 
         deleteCount.await(5000, TimeUnit.MILLISECONDS);
 
-        assertEquals(0, router.getRoutes().size());
+        assertEquals(0, router.getRoutes4().size());
         assertEquals(0, intentSynchronizer.getRouteIntents().size());
         verify(intentService);
     }
diff --git a/apps/sdnip/src/test/java/org/onosproject/sdnip/bgp/BgpSessionManagerTest.java b/apps/sdnip/src/test/java/org/onosproject/sdnip/bgp/BgpSessionManagerTest.java
index a4e0bab..096605a 100644
--- a/apps/sdnip/src/test/java/org/onosproject/sdnip/bgp/BgpSessionManagerTest.java
+++ b/apps/sdnip/src/test/java/org/onosproject/sdnip/bgp/BgpSessionManagerTest.java
@@ -303,7 +303,7 @@
     private Collection<BgpRouteEntry> waitForBgpRibIn(BgpSession bgpSession,
                                                       long expectedRoutes)
         throws InterruptedException {
-        Collection<BgpRouteEntry> bgpRibIn = bgpSession.bgpRibIn4().values();
+        Collection<BgpRouteEntry> bgpRibIn = bgpSession.getBgpRibIn4();
 
         final int maxChecks = 500;              // Max wait of 5 seconds
         for (int i = 0; i < maxChecks; i++) {
@@ -311,7 +311,7 @@
                 break;
             }
             Thread.sleep(10);
-            bgpRibIn = bgpSession.bgpRibIn4().values();
+            bgpRibIn = bgpSession.getBgpRibIn4();
         }
 
         return bgpRibIn;
@@ -329,7 +329,8 @@
      */
     private Collection<BgpRouteEntry> waitForBgpRoutes(long expectedRoutes)
         throws InterruptedException {
-        Collection<BgpRouteEntry> bgpRoutes = bgpSessionManager.getBgpRoutes();
+        Collection<BgpRouteEntry> bgpRoutes =
+            bgpSessionManager.getBgpRoutes4();
 
         final int maxChecks = 500;              // Max wait of 5 seconds
         for (int i = 0; i < maxChecks; i++) {
@@ -337,7 +338,7 @@
                 break;
             }
             Thread.sleep(10);
-            bgpRoutes = bgpSessionManager.getBgpRoutes();
+            bgpRoutes = bgpSessionManager.getBgpRoutes4();
         }
 
         return bgpRoutes;
