diff --git a/tests/daemon/rib/sl-announce.t.cpp b/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
similarity index 92%
rename from tests/daemon/rib/sl-announce.t.cpp
rename to tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
index 86b6025..06e3d5e 100644
--- a/tests/daemon/rib/sl-announce.t.cpp
+++ b/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,17 +23,17 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "rib/rib-manager.hpp"
+#include "mgmt/rib-manager.hpp"
+#include "rib/fib-updater.hpp"
 
 #include "tests/identity-management-fixture.hpp"
 
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
 namespace nfd {
-namespace rib {
 namespace tests {
 
-using namespace nfd::tests;
+using rib::Route;
 
 class RibManagerSlAnnounceFixture : public IdentityManagementTimeFixture
 {
@@ -49,7 +49,7 @@
     , m_trustedSigner(m_keyChain.createIdentity("/trusted", ndn::RsaKeyParams()))
     , m_untrustedSigner(m_keyChain.createIdentity("/untrusted", ndn::RsaKeyParams()))
   {
-    rib.mockFibResponse = [] (const RibUpdateBatch&) { return true; };
+    rib.mockFibResponse = [] (const auto&) { return true; };
     rib.wantMockFibResponseOnce = false;
 
     // Face, Controller, Dispatcher are irrelevant to SlAnnounce functions but required by
@@ -62,16 +62,16 @@
 
   template<typename ...T>
   ndn::PrefixAnnouncement
-  makeTrustedAnn(const T&... args)
+  makeTrustedAnn(T&&... args)
   {
-    return signPrefixAnn(makePrefixAnn(args...), m_keyChain, m_trustedSigner);
+    return signPrefixAnn(makePrefixAnn(std::forward<T>(args)...), m_keyChain, m_trustedSigner);
   }
 
   template<typename ...T>
   ndn::PrefixAnnouncement
-  makeUntrustedAnn(const T&... args)
+  makeUntrustedAnn(T&&... args)
   {
-    return signPrefixAnn(makePrefixAnn(args...), m_keyChain, m_untrustedSigner);
+    return signPrefixAnn(makePrefixAnn(std::forward<T>(args)...), m_keyChain, m_untrustedSigner);
   }
 
   /** \brief Invoke manager->slAnnounce and wait for result.
@@ -158,7 +158,7 @@
   }
 
 public:
-  Rib rib;
+  rib::Rib rib;
   unique_ptr<RibManager> manager;
 
 private:
@@ -166,13 +166,15 @@
   ndn::util::Scheduler m_scheduler;
   ndn::nfd::Controller m_nfdController;
   ndn::mgmt::Dispatcher m_dispatcher;
-  FibUpdater m_fibUpdater;
+  rib::FibUpdater m_fibUpdater;
 
   ndn::security::SigningInfo m_trustedSigner;
   ndn::security::SigningInfo m_untrustedSigner;
 };
 
-BOOST_FIXTURE_TEST_SUITE(TestSlAnnounce, RibManagerSlAnnounceFixture)
+BOOST_AUTO_TEST_SUITE(Mgmt)
+BOOST_AUTO_TEST_SUITE(TestRibManager)
+BOOST_FIXTURE_TEST_SUITE(SlAnnounce, RibManagerSlAnnounceFixture)
 
 BOOST_AUTO_TEST_CASE(AnnounceUnconfigured)
 {
@@ -327,8 +329,9 @@
   BOOST_CHECK(!pa);
 }
 
-BOOST_AUTO_TEST_SUITE_END() // TestSlAnnounce
+BOOST_AUTO_TEST_SUITE_END() // SlAnnounce
+BOOST_AUTO_TEST_SUITE_END() // TestRibManager
+BOOST_AUTO_TEST_SUITE_END() // Mgmt
 
 } // namespace tests
-} // namespace rib
 } // namespace nfd
diff --git a/tests/daemon/rib/rib-manager.t.cpp b/tests/daemon/mgmt/rib-manager.t.cpp
similarity index 93%
rename from tests/daemon/rib/rib-manager.t.cpp
rename to tests/daemon/mgmt/rib-manager.t.cpp
index be59ca5..46da6a1 100644
--- a/tests/daemon/rib/rib-manager.t.cpp
+++ b/tests/daemon/mgmt/rib-manager.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -23,22 +23,19 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "rib/rib-manager.hpp"
+#include "mgmt/rib-manager.hpp"
 #include "core/fib-max-depth.hpp"
+#include "rib/fib-updater.hpp"
 
 #include "tests/manager-common-fixture.hpp"
 
 #include <ndn-cxx/lp/tags.hpp>
-#include <ndn-cxx/mgmt/nfd/face-event-notification.hpp>
 #include <ndn-cxx/mgmt/nfd/face-status.hpp>
 #include <ndn-cxx/mgmt/nfd/rib-entry.hpp>
 
 namespace nfd {
-namespace rib {
 namespace tests {
 
-using namespace nfd::tests;
-
 struct ConfigurationStatus
 {
   bool isLocalhostConfigured;
@@ -65,7 +62,7 @@
     , m_fibUpdater(m_rib, m_nfdController)
     , m_manager(m_rib, m_face, m_keyChain, m_nfdController, m_dispatcher, m_scheduler)
   {
-    m_rib.mockFibResponse = [] (const RibUpdateBatch& batch) {
+    m_rib.mockFibResponse = [] (const rib::RibUpdateBatch& batch) {
       BOOST_CHECK(batch.begin() != batch.end());
       return true;
     };
@@ -93,7 +90,7 @@
   registerWithNfd()
   {
     m_manager.registerWithNfd();
-    advanceClocks(time::milliseconds(1));
+    advanceClocks(1_ms);
 
     auto replyFibAddCommand = [this] (const Interest& interest) {
       nfd::ControlParameters params(interest.getName().get(-5).blockFromValue());
@@ -114,7 +111,7 @@
     for (const auto& command : m_commands) {
       if (commandPrefix.isPrefixOf(command.getName())) {
         replyFibAddCommand(command);
-        advanceClocks(time::milliseconds(1));
+        advanceClocks(1_ms);
       }
     }
 
@@ -210,8 +207,8 @@
 
   ndn::util::Scheduler m_scheduler;
   ndn::nfd::Controller m_nfdController;
-  Rib m_rib;
-  FibUpdater m_fibUpdater;
+  rib::Rib m_rib;
+  rib::FibUpdater m_fibUpdater;
   RibManager m_manager;
 };
 
@@ -240,6 +237,7 @@
   return os << static_cast<int>(result);
 }
 
+BOOST_AUTO_TEST_SUITE(Mgmt)
 BOOST_AUTO_TEST_SUITE(TestRibManager)
 
 class AddTopPrefixFixture : public RibManagerFixture
@@ -389,20 +387,20 @@
 
 BOOST_AUTO_TEST_CASE(Expiration)
 {
-  auto paramsRegister = makeRegisterParameters("/test-expiry", 9527, time::milliseconds(50));
+  auto paramsRegister = makeRegisterParameters("/test-expiry", 9527, 50_ms);
   auto paramsUnregister = makeRegisterParameters("/test-expiry", 9527);
   receiveInterest(makeControlCommandRequest("/localhost/nfd/rib/register", paramsRegister));
 
-  advanceClocks(time::milliseconds(55));
+  advanceClocks(55_ms);
   BOOST_REQUIRE_EQUAL(m_commands.size(), 2); // the registered route has expired
   BOOST_CHECK_EQUAL(checkCommand(0, "add-nexthop", paramsRegister), CheckCommandResult::OK);
   BOOST_CHECK_EQUAL(checkCommand(1, "remove-nexthop", paramsUnregister), CheckCommandResult::OK);
 
   m_commands.clear();
-  paramsRegister.setExpirationPeriod(time::milliseconds(100));
+  paramsRegister.setExpirationPeriod(100_ms);
   receiveInterest(makeControlCommandRequest("/localhost/nfd/rib/register", paramsRegister));
 
-  advanceClocks(time::milliseconds(55));
+  advanceClocks(55_ms);
   BOOST_REQUIRE_EQUAL(m_commands.size(), 1); // the registered route is still active
   BOOST_CHECK_EQUAL(checkCommand(0, "add-nexthop", paramsRegister), CheckCommandResult::OK);
 }
@@ -431,8 +429,8 @@
 BOOST_FIXTURE_TEST_CASE(RibDataset, UnauthorizedRibManagerFixture)
 {
   uint64_t faceId = 0;
-  auto generateRoute = [&faceId] () -> Route {
-    Route route;
+  auto generateRoute = [&faceId] () -> rib::Route {
+    rib::Route route;
     route.faceId = ++faceId;
     route.cost = route.faceId * 10;
     route.expires = nullopt;
@@ -491,7 +489,7 @@
 {
   BOOST_CHECK_EQUAL(m_commands.size(), 0);
 
-  advanceClocks(time::seconds(301)); // RibManager::ACTIVE_FACE_FETCH_INTERVAL = 300s
+  advanceClocks(301_s); // RibManager::ACTIVE_FACE_FETCH_INTERVAL = 300s
   BOOST_REQUIRE_EQUAL(m_commands.size(), 2);
   BOOST_CHECK_EQUAL(m_commands[0].getName(), "/localhost/nfd/faces/events");
   BOOST_CHECK_EQUAL(m_commands[1].getName(), "/localhost/nfd/faces/list");
@@ -512,7 +510,7 @@
   activeFaces.push_back(status);
 
   m_manager.removeInvalidFaces(activeFaces);
-  advanceClocks(time::milliseconds(100));
+  advanceClocks(100_ms);
   BOOST_REQUIRE_EQUAL(m_rib.size(), 1);
 
   auto it1 = m_rib.find("/test-remove-invalid-faces-1");
@@ -531,24 +529,23 @@
   receiveInterest(makeControlCommandRequest("/localhost/nfd/rib/register", parameters2));
   BOOST_REQUIRE_EQUAL(m_rib.size(), 2);
 
-  auto makeNotification = [] (ndn::nfd::FaceEventKind eventKind, uint64_t faceId) -> ndn::nfd::FaceEventNotification {
-    ndn::nfd::FaceEventNotification notification;
-    notification.setKind(eventKind).setFaceId(faceId);
-    return notification;
+  auto makeNotification = [] (ndn::nfd::FaceEventKind kind, uint64_t faceId) {
+    return ndn::nfd::FaceEventNotification().setKind(kind).setFaceId(faceId);
   };
 
   m_manager.onNotification(makeNotification(ndn::nfd::FaceEventKind::FACE_EVENT_DESTROYED, 1));
-  advanceClocks(time::milliseconds(100));
+  advanceClocks(100_ms);
   BOOST_CHECK_EQUAL(m_rib.size(), 0);
 
   m_manager.onNotification(makeNotification(ndn::nfd::FaceEventKind::FACE_EVENT_CREATED, 2));
-  advanceClocks(time::milliseconds(100));
+  advanceClocks(100_ms);
   BOOST_CHECK_EQUAL(m_rib.size(), 0);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // FaceMonitor
+
 BOOST_AUTO_TEST_SUITE_END() // TestRibManager
+BOOST_AUTO_TEST_SUITE_END() // Mgmt
 
 } // namespace tests
-} // namespace rib
 } // namespace nfd
