diff --git a/tests/rib/fib-updates-common.hpp b/tests/rib/fib-updates-common.hpp
index df41c3e..59505bc 100644
--- a/tests/rib/fib-updates-common.hpp
+++ b/tests/rib/fib-updates-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+ * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,6 +23,9 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifndef NFD_TESTS_RIB_FIB_UPDATES_COMMON_HPP
+#define NFD_TESTS_RIB_FIB_UPDATES_COMMON_HPP
+
 #include "rib/fib-updater.hpp"
 #include "rib-test-common.hpp"
 #include "tests/identity-management-fixture.hpp"
@@ -67,7 +70,9 @@
   }
 
   void
-  insertRoute(const Name& name, uint64_t faceId, uint64_t origin, uint64_t cost, uint64_t flags)
+  insertRoute(const Name& name, uint64_t faceId,
+              std::underlying_type<ndn::nfd::RouteOrigin>::type origin,
+              uint64_t cost, uint64_t flags)
   {
     Route route = createRoute(faceId, origin, cost, flags);
 
@@ -80,7 +85,8 @@
   }
 
   void
-  eraseRoute(const Name& name, uint64_t faceId, uint64_t origin)
+  eraseRoute(const Name& name, uint64_t faceId,
+             std::underlying_type<ndn::nfd::RouteOrigin>::type origin)
   {
     Route route = createRoute(faceId, origin, 0, 0);
 
@@ -175,3 +181,5 @@
 } // namespace tests
 } // namespace rib
 } // namespace nfd
+
+#endif // NFD_TESTS_RIB_FIB_UPDATES_COMMON_HPP
diff --git a/tests/rib/rib-entry.t.cpp b/tests/rib/rib-entry.t.cpp
index 03cd8b9..65f73dc 100644
--- a/tests/rib/rib-entry.t.cpp
+++ b/tests/rib/rib-entry.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+ * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -40,16 +40,16 @@
 
   rib::Route route1;
   route1.faceId = 1;
-  route1.origin = 0;
+  route1.origin = ndn::nfd::ROUTE_ORIGIN_APP;
 
-  std::tie(entryIt, didInsert) =  entry.insertRoute(route1);
+  std::tie(entryIt, didInsert) = entry.insertRoute(route1);
   BOOST_CHECK_EQUAL(entry.getRoutes().size(), 1);
   BOOST_CHECK(entryIt == entry.findRoute(route1));
   BOOST_CHECK(didInsert);
 
   Route route2;
   route2.faceId = 1;
-  route2.origin = 128;
+  route2.origin = ndn::nfd::ROUTE_ORIGIN_NLSR;
 
   std::tie(entryIt, didInsert) = entry.insertRoute(route2);
   BOOST_CHECK_EQUAL(entry.getRoutes().size(), 2);
diff --git a/tests/rib/rib-manager.t.cpp b/tests/rib/rib-manager.t.cpp
index 0264b9f..117b264 100644
--- a/tests/rib/rib-manager.t.cpp
+++ b/tests/rib/rib-manager.t.cpp
@@ -137,26 +137,26 @@
   }
 
 public:
-  ControlParameters
-  makeRegisterParameters(const Name& name, uint64_t id = 0,
+  static ControlParameters
+  makeRegisterParameters(const Name& name, uint64_t faceId = 0,
                          time::milliseconds expiry = time::milliseconds::max())
   {
     return ControlParameters()
       .setName(name)
-      .setFaceId(id)
-      .setOrigin(128)
+      .setFaceId(faceId)
+      .setOrigin(ndn::nfd::ROUTE_ORIGIN_NLSR)
       .setCost(10)
       .setFlags(0)
       .setExpirationPeriod(expiry);
   }
 
-  ControlParameters
-  makeUnregisterParameters(const Name& name, uint64_t id = 0)
+  static ControlParameters
+  makeUnregisterParameters(const Name& name, uint64_t faceId = 0)
   {
     return ControlParameters()
       .setName(name)
-      .setFaceId(id)
-      .setOrigin(128);
+      .setFaceId(faceId)
+      .setOrigin(ndn::nfd::ROUTE_ORIGIN_NLSR);
   }
 
   void
diff --git a/tests/rib/rib-test-common.hpp b/tests/rib/rib-test-common.hpp
index 997b455..3a09d4b 100644
--- a/tests/rib/rib-test-common.hpp
+++ b/tests/rib/rib-test-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,6 +23,9 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifndef NFD_TESTS_RIB_RIB_TEST_COMMON_HPP
+#define NFD_TESTS_RIB_RIB_TEST_COMMON_HPP
+
 #include "rib/route.hpp"
 
 namespace nfd {
@@ -30,11 +33,14 @@
 namespace tests {
 
 inline Route
-createRoute(uint64_t faceId, uint64_t origin, uint64_t cost, uint64_t flags)
+createRoute(uint64_t faceId,
+            std::underlying_type<ndn::nfd::RouteOrigin>::type origin,
+            uint64_t cost = 0,
+            uint64_t flags = 0)
 {
   Route temp;
   temp.faceId = faceId;
-  temp.origin = origin;
+  temp.origin = static_cast<ndn::nfd::RouteOrigin>(origin);
   temp.cost = cost;
   temp.flags = flags;
 
@@ -44,3 +50,5 @@
 } // namespace tests
 } // namespace rib
 } // namespace nfd
+
+#endif // NFD_TESTS_RIB_RIB_TEST_COMMON_HPP
diff --git a/tests/rib/rib.t.cpp b/tests/rib/rib.t.cpp
index 51a8040..d856f94 100644
--- a/tests/rib/rib.t.cpp
+++ b/tests/rib/rib.t.cpp
@@ -1,6 +1,6 @@
- /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+ * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -25,10 +25,9 @@
 
 #include "rib/rib.hpp"
 
+#include "rib-test-common.hpp"
 #include "tests/test-common.hpp"
 
-#include <ndn-cxx/encoding/tlv-nfd.hpp>
-
 namespace nfd {
 namespace rib {
 namespace tests {
@@ -39,40 +38,28 @@
 {
   rib::Rib rib;
 
-  Route root;
   Name name1("/");
-  root.faceId = 1;
-  root.origin = 20;
-  rib.insert(name1, root);
+  rib.insert(name1, createRoute(1, 20));
 
-  Route route1;
   Name name2("/hello");
-  route1.faceId = 2;
-  route1.origin = 20;
-  rib.insert(name2, route1);
+  rib.insert(name2, createRoute(2, 20));
 
-  Route route2;
   Name name3("/hello/world");
-  route2.faceId = 3;
-  route2.origin = 20;
-  rib.insert(name3, route2);
+  rib.insert(name3, createRoute(3, 20));
 
   shared_ptr<rib::RibEntry> ribEntry = rib.findParent(name3);
-  BOOST_REQUIRE(static_cast<bool>(ribEntry));
+  BOOST_REQUIRE(ribEntry != nullptr);
   BOOST_CHECK_EQUAL(ribEntry->getRoutes().front().faceId, 2);
 
   ribEntry = rib.findParent(name2);
-  BOOST_REQUIRE(static_cast<bool>(ribEntry));
+  BOOST_REQUIRE(ribEntry != nullptr);
   BOOST_CHECK_EQUAL(ribEntry->getRoutes().front().faceId, 1);
 
-  Route route3;
   Name name4("/hello/test/foo/bar");
-  route2.faceId = 3;
-  route2.origin = 20;
-  rib.insert(name4, route3);
+  rib.insert(name4, createRoute(3, 20));
 
   ribEntry = rib.findParent(name4);
-  BOOST_CHECK(ribEntry != shared_ptr<rib::RibEntry>());
+  BOOST_REQUIRE(ribEntry != nullptr);
   BOOST_CHECK(ribEntry->getRoutes().front().faceId == 2);
 }
 
@@ -80,33 +67,21 @@
 {
   rib::Rib rib;
 
-  Route route1;
   Name name1("/");
-  route1.faceId = 1;
-  route1.origin = 20;
-  rib.insert(name1, route1);
+  rib.insert(name1, createRoute(1, 20));
 
-  Route route2;
   Name name2("/hello/world");
-  route2.faceId = 2;
-  route2.origin = 20;
-  rib.insert(name2, route2);
+  rib.insert(name2, createRoute(2, 20));
 
-  Route route3;
   Name name3("/hello/test/foo/bar");
-  route3.faceId = 3;
-  route3.origin = 20;
-  rib.insert(name3, route3);
+  rib.insert(name3, createRoute(3, 20));
 
   BOOST_CHECK_EQUAL((rib.find(name1)->second)->getChildren().size(), 2);
   BOOST_CHECK_EQUAL((rib.find(name2)->second)->getChildren().size(), 0);
   BOOST_CHECK_EQUAL((rib.find(name3)->second)->getChildren().size(), 0);
 
-  Route entry4;
   Name name4("/hello");
-  entry4.faceId = 4;
-  entry4.origin = 20;
-  rib.insert(name4, entry4);
+  rib.insert(name4, createRoute(4, 20));
 
   BOOST_CHECK_EQUAL((rib.find(name1)->second)->getChildren().size(), 1);
   BOOST_CHECK_EQUAL((rib.find(name2)->second)->getChildren().size(), 0);
@@ -126,30 +101,22 @@
 {
   rib::Rib rib;
 
-  Route route1;
+  Route route1 = createRoute(1, 20);
   Name name1("/");
-  route1.faceId = 1;
-  route1.origin = 20;
   rib.insert(name1, route1);
 
-  Route route2;
+  Route route2 = createRoute(2, 20);
   Name name2("/hello/world");
-  route2.faceId = 2;
-  route2.origin = 20;
   rib.insert(name2, route2);
 
-  Route route3;
+  Route route3 = createRoute(1, 20);
   Name name3("/hello/world");
-  route3.faceId = 1;
-  route3.origin = 20;
   rib.insert(name3, route3);
 
-  Route entry4;
+  Route route4 = createRoute(1, 20);
   Name name4("/not/inserted");
-  entry4.faceId = 1;
-  entry4.origin = 20;
 
-  rib.erase(name4, entry4);
+  rib.erase(name4, route4);
   rib.erase(name1, route1);
 
   BOOST_CHECK(rib.find(name1) == rib.end());
@@ -164,30 +131,22 @@
 
   BOOST_CHECK(rib.find(name2) == rib.end());
 
-  rib.erase(name4, entry4);
+  rib.erase(name4, route4);
 }
 
 BOOST_AUTO_TEST_CASE(EraseRibEntry)
 {
   rib::Rib rib;
 
-  Route route1;
   Name name1("/");
-  route1.faceId = 1;
-  route1.origin = 20;
-  rib.insert(name1, route1);
+  rib.insert(name1, createRoute(1, 20));
 
-  Route route2;
+  Route route2 = createRoute(2, 20);
   Name name2("/hello");
-  route2.faceId = 2;
-  route2.origin = 20;
   rib.insert(name2, route2);
 
-  Route route3;
   Name name3("/hello/world");
-  route3.faceId = 1;
-  route3.origin = 20;
-  rib.insert(name3, route3);
+  rib.insert(name3, createRoute(1, 20));
 
   shared_ptr<rib::RibEntry> ribEntry1 = rib.find(name1)->second;
   shared_ptr<rib::RibEntry> ribEntry2 = rib.find(name2)->second;
@@ -208,7 +167,6 @@
   Route route1;
   Name name1("/hello/world");
   route1.faceId = 1;
-  route1.origin = 20;
   route1.cost = 10;
   route1.flags = ndn::nfd::ROUTE_FLAG_CHILD_INHERIT | ndn::nfd::ROUTE_FLAG_CAPTURE;
   route1.expires = time::steady_clock::now() + time::milliseconds(1500);
@@ -222,7 +180,6 @@
   Route route2;
   Name name2("/hello/world");
   route2.faceId = 1;
-  route2.origin = 20;
   route2.cost = 100;
   route2.flags = ndn::nfd::ROUTE_FLAG_CHILD_INHERIT;
   route2.expires = time::steady_clock::now() + time::seconds(0);
@@ -241,7 +198,7 @@
   rib.insert(name3, route2);
   BOOST_CHECK_EQUAL(rib.size(), 3);
 
-  route2.origin = 1;
+  route2.origin = ndn::nfd::ROUTE_ORIGIN_AUTOCONF;
   rib.insert(name3, route2);
   BOOST_CHECK_EQUAL(rib.size(), 4);
 
@@ -252,12 +209,12 @@
   rib.erase(name4, route2);
   BOOST_CHECK_EQUAL(rib.size(), 3);
 
-  route2.origin = 20;
+  route2.origin = ndn::nfd::ROUTE_ORIGIN_APP;
   rib.erase(name4, route2);
   BOOST_CHECK_EQUAL(rib.size(), 2);
 
-  BOOST_CHECK_EQUAL(rib.find(name2, route2), static_cast<Route*>(0));
-  BOOST_CHECK_NE(rib.find(name1, route1), static_cast<Route*>(0));
+  BOOST_CHECK(rib.find(name2, route2) == nullptr);
+  BOOST_CHECK(rib.find(name1, route1) != nullptr);
 
   rib.erase(name1, route1);
   BOOST_CHECK_EQUAL(rib.size(), 1);
@@ -270,15 +227,8 @@
   Route route;
   Name name("/hello/world");
 
-  Route route1;
-  route1.faceId = 1;
-  route1.origin = 20;
-  route1.cost = 10;
-
-  Route route2;
-  route2.faceId = 2;
-  route2.origin = 30;
-  route2.cost = 20;
+  Route route1 = createRoute(1, 20, 10);
+  Route route2 = createRoute(2, 30, 20);
 
   RibRouteRef routeInfo;
 
@@ -333,31 +283,24 @@
   rib.erase(name, route);
   BOOST_CHECK_EQUAL(nBeforeRemoveRouteInvocations, 2);
   BOOST_CHECK_EQUAL(nAfterEraseEntryInvocations, 1);
-
 }
 
 BOOST_AUTO_TEST_CASE(Output)
 {
   rib::Rib rib;
 
-  Route root;
+  Route root = createRoute(1, 20);
   Name name1("/");
-  root.faceId = 1;
-  root.origin = 20;
   root.expires = time::steady_clock::TimePoint::max();
   rib.insert(name1, root);
 
-  Route route1;
+  Route route1 = createRoute(2, 20);
   Name name2("/hello");
-  route1.faceId = 2;
-  route1.origin = 20;
   route1.expires = time::steady_clock::TimePoint::max();
   rib.insert(name2, route1);
 
-  Route route2;
+  Route route2 = createRoute(3, 20);
   Name name3("/hello/world");
-  route2.faceId = 3;
-  route2.origin = 20;
   route2.expires = time::steady_clock::TimePoint::max();
   rib.insert(name3, route2);
 
