Carry original route in ResolvedRoute object.

The original route may have information of interest to consumers, such
as the route source or VRF information.

Change-Id: I32df752c92e235423694b13d4ff239a38bae5a50
diff --git a/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpFibTest.java b/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpFibTest.java
index 0d45475..4d04b82 100644
--- a/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpFibTest.java
+++ b/apps/sdnip/src/test/java/org/onosproject/sdnip/SdnIpFibTest.java
@@ -38,6 +38,7 @@
 import org.onosproject.incubator.net.intf.InterfaceService;
 import org.onosproject.incubator.net.intf.InterfaceServiceAdapter;
 import org.onosproject.incubator.net.routing.ResolvedRoute;
+import org.onosproject.incubator.net.routing.Route;
 import org.onosproject.incubator.net.routing.RouteEvent;
 import org.onosproject.incubator.net.routing.RouteListener;
 import org.onosproject.incubator.net.routing.RouteServiceAdapter;
@@ -192,7 +193,7 @@
     @Test
     public void testRouteAddToNoVlan() {
         // Build the expected route
-        ResolvedRoute route = new ResolvedRoute(PREFIX1, IP3, MAC3, SW3_ETH1);
+        ResolvedRoute route = createRoute(PREFIX1, IP3, MAC3, SW3_ETH1);
 
         MultiPointToSinglePointIntent intent =
                 createIntentToThreeSrcOneTwo(PREFIX1);
@@ -216,7 +217,7 @@
     @Test
     public void testRouteAddToVlan() {
         // Build the expected route
-        ResolvedRoute route = new ResolvedRoute(PREFIX2, IP1, MAC1, SW1_ETH1);
+        ResolvedRoute route = createRoute(PREFIX2, IP1, MAC1, SW1_ETH1);
 
         MultiPointToSinglePointIntent intent = createIntentToOne(PREFIX2);
 
@@ -245,8 +246,8 @@
         testRouteAddToNoVlan();
 
         // Build the new route entries for prefix1 and prefix2
-        ResolvedRoute oldRoutePrefixOne = new ResolvedRoute(PREFIX1, IP3, MAC3, SW3_ETH1);
-        ResolvedRoute routePrefixOne = new ResolvedRoute(PREFIX1, IP1, MAC1, SW1_ETH1);
+        ResolvedRoute oldRoutePrefixOne = createRoute(PREFIX1, IP3, MAC3, SW3_ETH1);
+        ResolvedRoute routePrefixOne = createRoute(PREFIX1, IP1, MAC1, SW1_ETH1);
 
         // Create the new expected intents
         MultiPointToSinglePointIntent newPrefixOneIntent = createIntentToOne(PREFIX1);
@@ -280,8 +281,8 @@
         testRouteAddToVlan();
 
         // Build the new route entries for prefix1 and prefix2
-        ResolvedRoute oldRoutePrefix = new ResolvedRoute(PREFIX2, IP1, MAC1, SW1_ETH1);
-        ResolvedRoute routePrefix = new ResolvedRoute(PREFIX2, IP3, MAC3, SW3_ETH1);
+        ResolvedRoute oldRoutePrefix = createRoute(PREFIX2, IP1, MAC1, SW1_ETH1);
+        ResolvedRoute routePrefix = createRoute(PREFIX2, IP3, MAC3, SW3_ETH1);
 
         // Create the new expected intents
         MultiPointToSinglePointIntent newPrefixIntent =
@@ -313,7 +314,7 @@
         testRouteAddToNoVlan();
 
         // Construct the existing route entry
-        ResolvedRoute route = new ResolvedRoute(PREFIX1, IP3, MAC3, SW3_ETH1);
+        ResolvedRoute route = createRoute(PREFIX1, IP3, MAC3, SW3_ETH1);
 
         // Create existing intent
         MultiPointToSinglePointIntent removedIntent =
@@ -623,6 +624,12 @@
         return intent;
     }
 
+    private static ResolvedRoute createRoute(IpPrefix prefix, IpAddress nextHop,
+                                             MacAddress nextHopMac, ConnectPoint location) {
+        return new ResolvedRoute(
+                new Route(Route.Source.UNDEFINED, prefix, nextHop), nextHopMac, location);
+    }
+
     private class TestCoreService extends CoreServiceAdapter {
         @Override
         public ApplicationId getAppId(String name) {