diff --git a/tests/core/config-file.t.cpp b/tests/core/config-file.t.cpp
index 15ae377..8a41ac2 100644
--- a/tests/core/config-file.t.cpp
+++ b/tests/core/config-file.t.cpp
@@ -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-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -75,40 +75,34 @@
 "}\n";
 
 // counts of the respective section counts in config_example.info
-
 const int CONFIG_N_A_SECTIONS = 1;
 const int CONFIG_N_B_SECTIONS = 1;
 
 class DummySubscriber
 {
 public:
-
-  DummySubscriber(ConfigFile& config,
-                  int nASections,
-                  int nBSections,
-                  bool expectDryRun)
-    : m_nASections(nASections),
-      m_nBSections(nBSections),
-      m_nRemainingACallbacks(nASections),
-      m_nRemainingBCallbacks(nBSections),
-      m_expectDryRun(expectDryRun)
+  DummySubscriber(ConfigFile& config, int nASections, int nBSections, bool expectDryRun)
+    : m_nASections(nASections)
+    , m_nBSections(nBSections)
+    , m_nRemainingACallbacks(nASections)
+    , m_nRemainingBCallbacks(nBSections)
+    , m_expectDryRun(expectDryRun)
   {
-
   }
 
+  virtual
+  ~DummySubscriber() = default;
+
   void
   onA(const ConfigSection& section, bool isDryRun)
   {
-    // NFD_LOG_DEBUG("a");
     BOOST_CHECK_EQUAL(isDryRun, m_expectDryRun);
     --m_nRemainingACallbacks;
   }
 
-
   void
   onB(const ConfigSection& section, bool isDryRun)
   {
-    // NFD_LOG_DEBUG("b");
     BOOST_CHECK_EQUAL(isDryRun, m_expectDryRun);
     --m_nRemainingBCallbacks;
   }
@@ -127,12 +121,6 @@
       m_nRemainingBCallbacks == m_nBSections;
   }
 
-  virtual
-  ~DummySubscriber()
-  {
-
-  }
-
 private:
   int m_nASections;
   int m_nBSections;
@@ -144,7 +132,7 @@
 class DummyAllSubscriber : public DummySubscriber
 {
 public:
-  DummyAllSubscriber(ConfigFile& config, bool expectDryRun=false)
+  DummyAllSubscriber(ConfigFile& config, bool expectDryRun = false)
     : DummySubscriber(config,
                       CONFIG_N_A_SECTIONS,
                       CONFIG_N_B_SECTIONS,
@@ -153,12 +141,6 @@
     config.addSectionHandler("a", bind(&DummySubscriber::onA, this, _1, _2));
     config.addSectionHandler("b", bind(&DummySubscriber::onB, this, _1, _2));
   }
-
-  virtual
-  ~DummyAllSubscriber()
-  {
-
-  }
 };
 
 class DummyOneSubscriber : public DummySubscriber
@@ -166,7 +148,7 @@
 public:
   DummyOneSubscriber(ConfigFile& config,
                      const std::string& sectionName,
-                     bool expectDryRun=false)
+                     bool expectDryRun = false)
     : DummySubscriber(config,
                       (sectionName == "a"),
                       (sectionName == "b"),
@@ -188,12 +170,6 @@
       }
 
   }
-
-  virtual
-  ~DummyOneSubscriber()
-  {
-
-  }
 };
 
 class DummyNoSubscriber : public DummySubscriber
@@ -202,13 +178,6 @@
   DummyNoSubscriber(ConfigFile& config, bool expectDryRun)
     : DummySubscriber(config, 0, 0, expectDryRun)
   {
-
-  }
-
-  virtual
-  ~DummyNoSubscriber()
-  {
-
   }
 };
 
@@ -375,8 +344,6 @@
   bool m_missingFired;
 };
 
-
-
 BOOST_FIXTURE_TEST_CASE(OnConfigUncoveredSections, MissingCallbackFixture)
 {
   ConfigFile file;
diff --git a/tests/core/manager-base.t.cpp b/tests/core/manager-base.t.cpp
index 49f35b9..2137a01 100644
--- a/tests/core/manager-base.t.cpp
+++ b/tests/core/manager-base.t.cpp
@@ -84,7 +84,6 @@
   ManagerTester m_manager;
 };
 
-BOOST_AUTO_TEST_SUITE(Core)
 BOOST_FIXTURE_TEST_SUITE(TestManagerBase, ManagerBaseFixture)
 
 BOOST_AUTO_TEST_CASE(RegisterCommandHandler)
@@ -170,7 +169,6 @@
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestManagerBase
-BOOST_AUTO_TEST_SUITE_END() // Core
 
 } // namespace tests
 } // namespace nfd
diff --git a/tests/core/ndebug.t.cpp b/tests/core/ndebug.t.cpp
index a624b6b..3af09aa 100644
--- a/tests/core/ndebug.t.cpp
+++ b/tests/core/ndebug.t.cpp
@@ -38,6 +38,8 @@
   // in release builds, assertion shouldn't execute
   BOOST_ASSERT(false);
 #endif
+  // Trivial check to avoid "test case did not check any assertions" message from Boost.Test
+  BOOST_CHECK(true);
 }
 
 BOOST_AUTO_TEST_CASE(SideEffect)
diff --git a/tests/core/network.t.cpp b/tests/core/network.t.cpp
index 74ceaac..043a7dd 100644
--- a/tests/core/network.t.cpp
+++ b/tests/core/network.t.cpp
@@ -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-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -144,7 +144,7 @@
                  boost::lexical_cast<Network>("2001:db8:3f9:0::/64"));
 }
 
-BOOST_AUTO_TEST_SUITE_END() // CoreNetwork
+BOOST_AUTO_TEST_SUITE_END() // TestNetwork
 
 } // namespace tests
 } // namespace nfd
diff --git a/tests/core/scheduler.t.cpp b/tests/core/scheduler.t.cpp
index 45e6e06..a2ad752 100644
--- a/tests/core/scheduler.t.cpp
+++ b/tests/core/scheduler.t.cpp
@@ -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-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -74,6 +74,7 @@
     ++count3;
   }
 
+public:
   int count1;
   int count2;
   int count3;
@@ -102,17 +103,21 @@
 {
   EventId i;
   scheduler::cancel(i);
+
+  // Trivial check to avoid "test case did not check any assertions" message from Boost.Test
+  BOOST_CHECK(true);
 }
 
 class SelfCancelFixture : protected BaseFixture
 {
 public:
   void
-  cancelSelf()
+  cancelSelf() const
   {
     scheduler::cancel(m_selfEventId);
   }
 
+public:
   EventId m_selfEventId;
 };
 
@@ -182,7 +187,7 @@
   BOOST_CHECK(s1 != s2);
 }
 
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestScheduler
 
 } // namespace tests
 } // namespace nfd
diff --git a/tests/daemon/face/lp-reassembler.t.cpp b/tests/daemon/face/lp-reassembler.t.cpp
index 5b62d4e..9cfa8dd 100644
--- a/tests/daemon/face/lp-reassembler.t.cpp
+++ b/tests/daemon/face/lp-reassembler.t.cpp
@@ -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-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -33,11 +33,9 @@
 
 using namespace nfd::tests;
 
-BOOST_AUTO_TEST_SUITE(Face)
-
 class LpReassemblerFixture : public UnitTestTimeFixture
 {
-public:
+protected:
   LpReassemblerFixture()
   {
     reassembler.beforeTimeout.connect(
@@ -46,7 +44,7 @@
       });
   }
 
-public:
+protected:
   LpReassembler reassembler;
   std::vector<std::tuple<Transport::EndpointId, size_t>> timeoutHistory;
 
@@ -58,6 +56,7 @@
         0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
 };
 
+BOOST_AUTO_TEST_SUITE(Face)
 BOOST_FIXTURE_TEST_SUITE(TestLpReassembler, LpReassemblerFixture)
 
 BOOST_AUTO_TEST_SUITE(SingleFragment)
@@ -460,7 +459,9 @@
 
 BOOST_AUTO_TEST_SUITE_END() // MultiFragment
 
-BOOST_AUTO_TEST_CASE(MultiRemoteEndpoints)
+BOOST_AUTO_TEST_SUITE(MultipleRemoteEndpoints)
+
+BOOST_AUTO_TEST_CASE(Normal)
 {
   ndn::Buffer data1Buffer(data, 5);
   ndn::Buffer data2Buffer(data + 5, 5);
@@ -510,6 +511,8 @@
   BOOST_CHECK_EQUAL(reassembler.size(), 0);
 }
 
+BOOST_AUTO_TEST_SUITE_END() // MultipleRemoteEndpoints
+
 BOOST_AUTO_TEST_SUITE_END() // TestLpReassembler
 BOOST_AUTO_TEST_SUITE_END() // Face
 
diff --git a/tests/daemon/face/transport.t.cpp b/tests/daemon/face/transport.t.cpp
index 75bedf8..f1171e5 100644
--- a/tests/daemon/face/transport.t.cpp
+++ b/tests/daemon/face/transport.t.cpp
@@ -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-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -41,15 +41,11 @@
 namespace tests {
 
 using namespace nfd::tests;
-namespace ip = boost::asio::ip;
-
-BOOST_AUTO_TEST_SUITE(Face)
-
-using nfd::Face;
+namespace mpl = boost::mpl;
 
 class DummyTransportFixture : public BaseFixture
 {
-public:
+protected:
   DummyTransportFixture()
     : transport(nullptr)
     , sentPackets(nullptr)
@@ -68,13 +64,14 @@
     this->receivedPackets = &static_cast<DummyReceiveLinkService*>(face->getLinkService())->receivedPackets;
   }
 
-public:
+protected:
   unique_ptr<Face> face;
   DummyTransport* transport;
   std::vector<Transport::Packet>* sentPackets;
   std::vector<Transport::Packet>* receivedPackets;
 };
 
+BOOST_AUTO_TEST_SUITE(Face)
 BOOST_FIXTURE_TEST_SUITE(TestTransport, DummyTransportFixture)
 
 BOOST_AUTO_TEST_CASE(DummyTransportStaticProperties)
@@ -83,10 +80,6 @@
   checkStaticPropertiesInitialized(*transport);
 }
 
-BOOST_AUTO_TEST_SUITE(StateTransition)
-
-namespace mpl = boost::mpl;
-
 /** \brief a macro to declare a TransportState as a integral constant
  */
 #define TRANSPORT_STATE_C(X) mpl::int_<static_cast<int>(TransportState::X)>
@@ -198,8 +191,6 @@
   }
 }
 
-BOOST_AUTO_TEST_SUITE_END() // StateTransition
-
 BOOST_AUTO_TEST_CASE(NoExpirationTime)
 {
   initialize();
diff --git a/tests/daemon/fw/retx-suppression.t.cpp b/tests/daemon/fw/retx-suppression.t.cpp
index 7013aef..604dfb1 100644
--- a/tests/daemon/fw/retx-suppression.t.cpp
+++ b/tests/daemon/fw/retx-suppression.t.cpp
@@ -36,7 +36,8 @@
 
 using namespace nfd::tests;
 
-BOOST_FIXTURE_TEST_SUITE(FwRetxSuppression, UnitTestTimeFixture)
+BOOST_AUTO_TEST_SUITE(Fw)
+BOOST_FIXTURE_TEST_SUITE(TestRetxSuppression, UnitTestTimeFixture)
 
 BOOST_AUTO_TEST_CASE(Fixed)
 {
@@ -155,7 +156,8 @@
   // suppression interval is 100ms, until 304ms
 }
 
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestRetxSuppression
+BOOST_AUTO_TEST_SUITE_END() // Fw
 
 } // namespace tests
 } // namespace fw
diff --git a/tests/daemon/fw/rtt-estimator.t.cpp b/tests/daemon/fw/rtt-estimator.t.cpp
index 1a19443..b2c3fb6 100644
--- a/tests/daemon/fw/rtt-estimator.t.cpp
+++ b/tests/daemon/fw/rtt-estimator.t.cpp
@@ -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-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,7 +30,8 @@
 namespace nfd {
 namespace tests {
 
-BOOST_FIXTURE_TEST_SUITE(FwRttEstimator, BaseFixture)
+BOOST_AUTO_TEST_SUITE(Fw)
+BOOST_FIXTURE_TEST_SUITE(TestRttEstimator, BaseFixture)
 
 static inline double
 computeRtoAsFloatSeconds(RttEstimator& rtt)
@@ -74,7 +75,8 @@
   BOOST_CHECK_GT(rto6, rto1);
 }
 
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestRttEstimator
+BOOST_AUTO_TEST_SUITE_END() // Fw
 
 } // namespace tests
 } // namespace nfd
diff --git a/tests/daemon/fw/strategy-tester.hpp b/tests/daemon/fw/strategy-tester.hpp
index 3c4ef9b..f9d5de8 100644
--- a/tests/daemon/fw/strategy-tester.hpp
+++ b/tests/daemon/fw/strategy-tester.hpp
@@ -23,8 +23,8 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_TESTS_NFD_FW_STRATEGY_TESTER_HPP
-#define NFD_TESTS_NFD_FW_STRATEGY_TESTER_HPP
+#ifndef NFD_TESTS_DAEMON_FW_STRATEGY_TESTER_HPP
+#define NFD_TESTS_DAEMON_FW_STRATEGY_TESTER_HPP
 
 #include <boost/tuple/tuple_comparison.hpp>
 #include "fw/strategy.hpp"
@@ -105,4 +105,4 @@
 } // namespace fw
 } // namespace nfd
 
-#endif // NFD_TESTS_NFD_FW_STRATEGY_TESTER_HPP
+#endif // NFD_TESTS_DAEMON_FW_STRATEGY_TESTER_HPP
diff --git a/tests/daemon/fw/topology-tester.cpp b/tests/daemon/fw/topology-tester.cpp
index d934e35..5742592 100644
--- a/tests/daemon/fw/topology-tester.cpp
+++ b/tests/daemon/fw/topology-tester.cpp
@@ -75,7 +75,7 @@
     return;
   }
 
-  for (auto&& p : m_transports) {
+  for (const auto& p : m_transports) {
     if (p.first == i) {
       continue;
     }
diff --git a/tests/daemon/fw/topology-tester.hpp b/tests/daemon/fw/topology-tester.hpp
index 329244b..e5b21da 100644
--- a/tests/daemon/fw/topology-tester.hpp
+++ b/tests/daemon/fw/topology-tester.hpp
@@ -27,16 +27,17 @@
  *  \brief allows testing forwarding in a network topology
  */
 
-#ifndef NFD_TESTS_NFD_FW_TOPOLOGY_TESTER_HPP
-#define NFD_TESTS_NFD_FW_TOPOLOGY_TESTER_HPP
+#ifndef NFD_TESTS_DAEMON_FW_TOPOLOGY_TESTER_HPP
+#define NFD_TESTS_DAEMON_FW_TOPOLOGY_TESTER_HPP
 
-#include <ndn-cxx/face.hpp>
 #include "face/internal-transport.hpp"
 #include "face/face.hpp"
 #include "fw/strategy.hpp"
 #include "install-strategy.hpp"
 #include "tests/test-common.hpp"
 
+#include <ndn-cxx/face.hpp>
+
 namespace nfd {
 namespace fw {
 namespace tests {
@@ -236,4 +237,4 @@
 } // namespace fw
 } // namespace nfd
 
-#endif // NFD_TESTS_NFD_FW_TOPOLOGY_TESTER_HPP
+#endif // NFD_TESTS_DAEMON_FW_TOPOLOGY_TESTER_HPP
diff --git a/tests/daemon/mgmt/face-manager-command-fixture.hpp b/tests/daemon/mgmt/face-manager-command-fixture.hpp
index fcb89a4..8d66309 100644
--- a/tests/daemon/mgmt/face-manager-command-fixture.hpp
+++ b/tests/daemon/mgmt/face-manager-command-fixture.hpp
@@ -29,18 +29,17 @@
 #include "mgmt/face-manager.hpp"
 #include "fw/face-table.hpp"
 
+#include "tests/identity-management-fixture.hpp"
+
 #include <ndn-cxx/mgmt/dispatcher.hpp>
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
-#include "tests/identity-management-fixture.hpp"
-
 namespace nfd {
 namespace tests {
 
 class FaceManagerCommandNode
 {
 public:
-  explicit
   FaceManagerCommandNode(ndn::KeyChain& keyChain, uint16_t port);
 
   ~FaceManagerCommandNode();
diff --git a/tests/daemon/mgmt/face-manager.t.cpp b/tests/daemon/mgmt/face-manager.t.cpp
index ec37c57..c189894 100644
--- a/tests/daemon/mgmt/face-manager.t.cpp
+++ b/tests/daemon/mgmt/face-manager.t.cpp
@@ -24,11 +24,12 @@
  */
 
 #include "mgmt/face-manager.hpp"
-#include "nfd-manager-common-fixture.hpp"
-#include "../face/dummy-face.hpp"
 #include "face/tcp-factory.hpp"
 #include "face/udp-factory.hpp"
 
+#include "nfd-manager-common-fixture.hpp"
+#include "../face/dummy-face.hpp"
+
 #include <ndn-cxx/util/random.hpp>
 #include <ndn-cxx/encoding/tlv.hpp>
 #include <ndn-cxx/mgmt/nfd/channel-status.hpp>
@@ -37,8 +38,6 @@
 namespace nfd {
 namespace tests {
 
-BOOST_AUTO_TEST_SUITE(Mgmt)
-
 class FaceManagerFixture : public NfdManagerCommonFixture
 {
 public:
@@ -112,6 +111,7 @@
   FaceManager m_manager;
 };
 
+BOOST_AUTO_TEST_SUITE(Mgmt)
 BOOST_FIXTURE_TEST_SUITE(TestFaceManager, FaceManagerFixture)
 
 BOOST_AUTO_TEST_SUITE(DestroyFace)
@@ -149,94 +149,7 @@
 
 BOOST_AUTO_TEST_SUITE_END() // DestroyFace
 
-BOOST_AUTO_TEST_CASE(FaceEvents)
-{
-  auto addedFace = addFace(); // trigger FACE_EVENT_CREATED notification
-  BOOST_CHECK_NE(addedFace->getId(), -1);
-  int64_t faceId = addedFace->getId();
-
-  // check notification
-  {
-    Block payload;
-    ndn::nfd::FaceEventNotification notification;
-    BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
-    BOOST_CHECK_NO_THROW(payload = m_responses[0].getContent().blockFromValue());
-    BOOST_CHECK_EQUAL(payload.type(), ndn::tlv::nfd::FaceEventNotification);
-    BOOST_CHECK_NO_THROW(notification.wireDecode(payload));
-    BOOST_CHECK_EQUAL(notification.getKind(), ndn::nfd::FACE_EVENT_CREATED);
-    BOOST_CHECK_EQUAL(notification.getFaceId(), faceId);
-    BOOST_CHECK_EQUAL(notification.getRemoteUri(), addedFace->getRemoteUri().toString());
-    BOOST_CHECK_EQUAL(notification.getLocalUri(), addedFace->getLocalUri().toString());
-    BOOST_CHECK_EQUAL(notification.getFaceScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
-    BOOST_CHECK_EQUAL(notification.getFacePersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
-    BOOST_CHECK_EQUAL(notification.getLinkType(), ndn::nfd::LinkType::LINK_TYPE_POINT_TO_POINT);
-  }
-
-  addedFace->close(); // trigger FaceDestroy FACE_EVENT_DESTROYED
-  advanceClocks(time::milliseconds(1), 10);
-
-  // check notification
-  {
-    Block payload;
-    ndn::nfd::FaceEventNotification notification;
-    BOOST_REQUIRE_EQUAL(m_responses.size(), 2);
-    BOOST_CHECK_NO_THROW(payload = m_responses[1].getContent().blockFromValue());
-    BOOST_CHECK_EQUAL(payload.type(), ndn::tlv::nfd::FaceEventNotification);
-    BOOST_CHECK_NO_THROW(notification.wireDecode(payload));
-    BOOST_CHECK_EQUAL(notification.getKind(), ndn::nfd::FACE_EVENT_DESTROYED);
-    BOOST_CHECK_EQUAL(notification.getFaceId(), faceId);
-    BOOST_CHECK_EQUAL(notification.getRemoteUri(), addedFace->getRemoteUri().toString());
-    BOOST_CHECK_EQUAL(notification.getLocalUri(), addedFace->getLocalUri().toString());
-    BOOST_CHECK_EQUAL(notification.getFaceScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
-    BOOST_CHECK_EQUAL(notification.getFacePersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
-    BOOST_CHECK_EQUAL(notification.getLinkType(), ndn::nfd::LinkType::LINK_TYPE_POINT_TO_POINT);
-  }
-  BOOST_CHECK_EQUAL(addedFace->getId(), face::INVALID_FACEID);
-}
-
-// @todo Refactor when ndn::nfd::FaceStatus implementes operator!= and operator<<
-class FaceStatus : public ndn::nfd::FaceStatus
-{
-public:
-  FaceStatus(const ndn::nfd::FaceStatus& s)
-    : ndn::nfd::FaceStatus(s)
-  {
-  }
-};
-
-bool
-operator!=(const FaceStatus& left, const FaceStatus& right)
-{
-  return left.getRemoteUri() != right.getRemoteUri() ||
-         left.getLocalUri() != right.getLocalUri() ||
-         left.getFaceScope() != right.getFaceScope() ||
-         left.getFacePersistency() != right.getFacePersistency() ||
-         left.getLinkType() != right.getLinkType() ||
-         left.getFlags() != right.getFlags() ||
-         left.getNInInterests() != right.getNInInterests() ||
-         left.getNInDatas() != right.getNInDatas() ||
-         left.getNOutInterests() != right.getNOutInterests() ||
-         left.getNOutDatas() != right.getNOutDatas() ||
-         left.getNInBytes() != right.getNInBytes() ||
-         left.getNOutBytes() != right.getNOutBytes();
-}
-
-std::ostream&
-operator<<(std::ostream &os, const FaceStatus& status)
-{
-  os << "[" << status.getRemoteUri() << ", "
-     << status.getLocalUri() << ", "
-     << status.getFacePersistency() << ", "
-     << status.getLinkType() << ", "
-     << status.getFlags() << ", "
-     << status.getNInInterests() << ", "
-     << status.getNInDatas() << ", "
-     << status.getNOutInterests() << ", "
-     << status.getNOutDatas() << ", "
-     << status.getNInBytes() << ", "
-     << status.getNOutBytes() << "]";
-  return os;
-}
+BOOST_AUTO_TEST_SUITE(Datasets)
 
 BOOST_AUTO_TEST_CASE(FaceDataset)
 {
@@ -325,6 +238,7 @@
 class TestChannel : public Channel
 {
 public:
+  explicit
   TestChannel(const std::string& uri)
   {
     setUri(FaceUri(uri));
@@ -339,12 +253,12 @@
              ndn::nfd::FacePersistency persistency,
              bool wantLocalFieldsEnabled,
              const FaceCreatedCallback& onCreated,
-             const FaceCreationFailedCallback& onConnectFailed) override
+             const FaceCreationFailedCallback& onConnectFailed) final
   {
   }
 
   virtual std::vector<shared_ptr<const Channel>>
-  getChannels() const override
+  getChannels() const final
   {
     return m_channels;
   }
@@ -390,6 +304,57 @@
   }
 }
 
+BOOST_AUTO_TEST_SUITE_END() // Datasets
+
+BOOST_AUTO_TEST_SUITE(Notifications)
+
+BOOST_AUTO_TEST_CASE(FaceEventNotification)
+{
+  auto addedFace = addFace(); // trigger FACE_EVENT_CREATED notification
+  BOOST_CHECK_NE(addedFace->getId(), -1);
+  int64_t faceId = addedFace->getId();
+
+  // check notification
+  {
+    Block payload;
+    ndn::nfd::FaceEventNotification notification;
+    BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
+    BOOST_CHECK_NO_THROW(payload = m_responses[0].getContent().blockFromValue());
+    BOOST_CHECK_EQUAL(payload.type(), ndn::tlv::nfd::FaceEventNotification);
+    BOOST_CHECK_NO_THROW(notification.wireDecode(payload));
+    BOOST_CHECK_EQUAL(notification.getKind(), ndn::nfd::FACE_EVENT_CREATED);
+    BOOST_CHECK_EQUAL(notification.getFaceId(), faceId);
+    BOOST_CHECK_EQUAL(notification.getRemoteUri(), addedFace->getRemoteUri().toString());
+    BOOST_CHECK_EQUAL(notification.getLocalUri(), addedFace->getLocalUri().toString());
+    BOOST_CHECK_EQUAL(notification.getFaceScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
+    BOOST_CHECK_EQUAL(notification.getFacePersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
+    BOOST_CHECK_EQUAL(notification.getLinkType(), ndn::nfd::LinkType::LINK_TYPE_POINT_TO_POINT);
+  }
+
+  addedFace->close(); // trigger FaceDestroy FACE_EVENT_DESTROYED
+  advanceClocks(time::milliseconds(1), 10);
+
+  // check notification
+  {
+    Block payload;
+    ndn::nfd::FaceEventNotification notification;
+    BOOST_REQUIRE_EQUAL(m_responses.size(), 2);
+    BOOST_CHECK_NO_THROW(payload = m_responses[1].getContent().blockFromValue());
+    BOOST_CHECK_EQUAL(payload.type(), ndn::tlv::nfd::FaceEventNotification);
+    BOOST_CHECK_NO_THROW(notification.wireDecode(payload));
+    BOOST_CHECK_EQUAL(notification.getKind(), ndn::nfd::FACE_EVENT_DESTROYED);
+    BOOST_CHECK_EQUAL(notification.getFaceId(), faceId);
+    BOOST_CHECK_EQUAL(notification.getRemoteUri(), addedFace->getRemoteUri().toString());
+    BOOST_CHECK_EQUAL(notification.getLocalUri(), addedFace->getLocalUri().toString());
+    BOOST_CHECK_EQUAL(notification.getFaceScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
+    BOOST_CHECK_EQUAL(notification.getFacePersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
+    BOOST_CHECK_EQUAL(notification.getLinkType(), ndn::nfd::LinkType::LINK_TYPE_POINT_TO_POINT);
+  }
+  BOOST_CHECK_EQUAL(addedFace->getId(), face::INVALID_FACEID);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // Notifications
+
 BOOST_AUTO_TEST_SUITE_END() // TestFaceManager
 BOOST_AUTO_TEST_SUITE_END() // Mgmt
 
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 4bc642e..161e2f7 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -22,11 +22,13 @@
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
+
 #include "mgmt/fib-manager.hpp"
+#include "table/fib-nexthop.hpp"
 
 #include "nfd-manager-common-fixture.hpp"
-#include "table/fib-nexthop.hpp"
 #include "../face/dummy-face.hpp"
+
 #include <ndn-cxx/lp/tags.hpp>
 #include <ndn-cxx/mgmt/nfd/fib-entry.hpp>
 
@@ -107,16 +109,16 @@
     }
 
     if (faceId != face::FACEID_NULL) {
-      for (auto&& record : nextHops) {
+      for (const auto& record : nextHops) {
         if (record.getFace().getId() == faceId) {
-          return expectedCost != -1 && record.getCost() != static_cast<uint32_t>(expectedCost) ?
-            CheckNextHopResult::WRONG_COST : CheckNextHopResult::OK;
+          if (expectedCost != -1 && record.getCost() != static_cast<uint32_t>(expectedCost))
+            return CheckNextHopResult::WRONG_COST;
+          else
+            return CheckNextHopResult::OK;
         }
       }
-
       return CheckNextHopResult::NO_NEXTHOP;
     }
-
     return CheckNextHopResult::OK;
   }
 
@@ -152,8 +154,8 @@
   return os;
 }
 
-BOOST_FIXTURE_TEST_SUITE(Mgmt, FibManagerFixture)
-BOOST_AUTO_TEST_SUITE(TestFibManager)
+BOOST_AUTO_TEST_SUITE(Mgmt)
+BOOST_FIXTURE_TEST_SUITE(TestFibManager, FibManagerFixture)
 
 BOOST_AUTO_TEST_SUITE(AddNextHop)
 
@@ -389,6 +391,8 @@
 
 BOOST_AUTO_TEST_SUITE_END() // RemoveNextHop
 
+BOOST_AUTO_TEST_SUITE(List)
+
 // @todo Remove when ndn::nfd::FibEntry implements operator!= and operator<<
 class FibEntry : public ndn::nfd::FibEntry
 {
@@ -408,17 +412,17 @@
     return true;
   }
 
-  auto leftNextHops = left.getNextHopRecords();
-  auto rightNextHops = right.getNextHopRecords();
+  const auto& leftNextHops = left.getNextHopRecords();
+  const auto& rightNextHops = right.getNextHopRecords();
   if (leftNextHops.size() != rightNextHops.size()) {
     return true;
   }
 
-  for (auto&& nexthop : leftNextHops) {
-    auto hitEntry =
-      std::find_if(rightNextHops.begin(), rightNextHops.end(), [&] (const ndn::nfd::NextHopRecord& record) {
-          return nexthop.getCost() == record.getCost() && nexthop.getFaceId() == record.getFaceId();
-        });
+  for (const auto& nexthop : leftNextHops) {
+    auto hitEntry = std::find_if(rightNextHops.begin(), rightNextHops.end(),
+      [&] (const ndn::nfd::NextHopRecord& record) {
+        return nexthop.getCost() == record.getCost() && nexthop.getFaceId() == record.getFaceId();
+      });
 
     if (hitEntry == rightNextHops.end()) {
       return true;
@@ -476,7 +480,7 @@
     FibEntry record;
     record.setPrefix(matchedEntry->getPrefix());
     const auto& nextHops = matchedEntry->getNextHops();
-    for (auto&& next : nextHops) {
+    for (const auto& next : nextHops) {
       ndn::nfd::NextHopRecord nextHopRecord;
       nextHopRecord.setFaceId(next.getFace().getId());
       nextHopRecord.setCost(next.getCost());
@@ -486,11 +490,12 @@
   }
 
   BOOST_CHECK_EQUAL(actualPrefixes.size(), 0);
-
   BOOST_CHECK_EQUAL_COLLECTIONS(receivedRecords.begin(), receivedRecords.end(),
                                 expectedRecords.begin(), expectedRecords.end());
 }
 
+BOOST_AUTO_TEST_SUITE_END() // List
+
 BOOST_AUTO_TEST_SUITE_END() // TestFibManager
 BOOST_AUTO_TEST_SUITE_END() // Mgmt
 
diff --git a/tests/daemon/mgmt/forwarder-status-manager.t.cpp b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
index ec73af1..b9cade3 100644
--- a/tests/daemon/mgmt/forwarder-status-manager.t.cpp
+++ b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
@@ -31,8 +31,6 @@
 namespace nfd {
 namespace tests {
 
-BOOST_AUTO_TEST_SUITE(Mgmt)
-
 class ForwarderStatusManagerFixture : public NfdManagerCommonFixture
 {
 protected:
@@ -48,9 +46,10 @@
   time::system_clock::TimePoint startTime;
 };
 
+BOOST_AUTO_TEST_SUITE(Mgmt)
 BOOST_FIXTURE_TEST_SUITE(TestForwarderStatusManager, ForwarderStatusManagerFixture)
 
-BOOST_AUTO_TEST_CASE(GeneralStatus)
+BOOST_AUTO_TEST_CASE(GeneralStatusDataset)
 {
   // cause counters to be non-zero
   this->advanceClocks(time::seconds(3600));
diff --git a/tests/daemon/mgmt/nfd-manager-common-fixture.hpp b/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
index 65c5dcc..fb2dbc2 100644
--- a/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
+++ b/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
@@ -23,10 +23,10 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
-#define NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
+#ifndef NFD_TESTS_DAEMON_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
+#define NFD_TESTS_DAEMON_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
 
-#include "manager-common-fixture.hpp"
+#include "tests/manager-common-fixture.hpp"
 #include "fw/forwarder.hpp"
 #include "mgmt/command-authenticator.hpp"
 
@@ -58,7 +58,7 @@
 class CommandSuccess
 {
 public:
-  ControlResponse
+  static ControlResponse
   getExpected()
   {
     return ControlResponse()
@@ -71,7 +71,7 @@
 class CommandFailure
 {
 public:
-  ControlResponse
+  static ControlResponse
   getExpected()
   {
     return ControlResponse()
@@ -83,4 +83,4 @@
 } // namespace tests
 } // namespace nfd
 
-#endif // NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
+#endif // NFD_TESTS_DAEMON_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 1d8e135..56f22a7 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -24,14 +24,14 @@
  */
 
 #include "mgmt/strategy-choice-manager.hpp"
-#include "nfd-manager-common-fixture.hpp"
 
 #include "face/face.hpp"
 #include "face/internal-face.hpp"
+#include "fw/strategy.hpp"
 #include "table/name-tree.hpp"
 #include "table/strategy-choice.hpp"
-#include "fw/strategy.hpp"
 
+#include "nfd-manager-common-fixture.hpp"
 #include "tests/daemon/face/dummy-face.hpp"
 #include "tests/daemon/fw/dummy-strategy.hpp"
 #include "tests/daemon/fw/install-strategy.hpp"
@@ -77,8 +77,8 @@
   StrategyChoiceManager m_manager;
 };
 
-BOOST_FIXTURE_TEST_SUITE(Mgmt, StrategyChoiceManagerFixture)
-BOOST_AUTO_TEST_SUITE(TestStrategyChoiceManager)
+BOOST_AUTO_TEST_SUITE(Mgmt)
+BOOST_FIXTURE_TEST_SUITE(TestStrategyChoiceManager, StrategyChoiceManagerFixture)
 
 BOOST_AUTO_TEST_CASE(SetStrategy)
 {
@@ -191,11 +191,11 @@
   return os;
 }
 
-BOOST_AUTO_TEST_CASE(ListChoices)
+BOOST_AUTO_TEST_CASE(StrategyChoiceDataset)
 {
   size_t nPreInsertedStrategies = m_strategyChoice.size(); // the best-route strategy
   std::set<Name> actualNames, actualStrategies;
-  for (auto&& entry : m_strategyChoice) {
+  for (const auto& entry : m_strategyChoice) {
     actualNames.insert(entry.getPrefix());
     actualStrategies.insert(entry.getStrategyName());
   }
@@ -239,7 +239,6 @@
 
   BOOST_CHECK_EQUAL(actualNames.size(), 0);
   BOOST_CHECK_EQUAL(actualStrategies.size(), 0);
-
   BOOST_CHECK_EQUAL_COLLECTIONS(receivedRecords.begin(), receivedRecords.end(),
                                 expectedRecords.begin(), expectedRecords.end());
 }
diff --git a/tests/daemon/table/cs-policy-lru.t.cpp b/tests/daemon/table/cs-policy-lru.t.cpp
index a4e76a8..71f1764 100644
--- a/tests/daemon/table/cs-policy-lru.t.cpp
+++ b/tests/daemon/table/cs-policy-lru.t.cpp
@@ -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-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -35,9 +35,10 @@
 
 using namespace nfd::tests;
 
-BOOST_AUTO_TEST_SUITE(CsLru)
+BOOST_AUTO_TEST_SUITE(Table)
+BOOST_AUTO_TEST_SUITE(TestCsLru)
 
-BOOST_FIXTURE_TEST_CASE(EvictOneLRU, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_CASE(EvictOne, UnitTestTimeFixture)
 {
   Cs cs(3);
   cs.setPolicy(make_unique<LruPolicy>());
@@ -84,7 +85,8 @@
           bind([] { BOOST_CHECK(true); }));
 }
 
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestCsLru
+BOOST_AUTO_TEST_SUITE_END() // Table
 
 } // namespace tests
 } // namespace cs
diff --git a/tests/daemon/table/cs-policy-priority-fifo.t.cpp b/tests/daemon/table/cs-policy-priority-fifo.t.cpp
index 8f365d4..01380ef 100644
--- a/tests/daemon/table/cs-policy-priority-fifo.t.cpp
+++ b/tests/daemon/table/cs-policy-priority-fifo.t.cpp
@@ -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-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -35,7 +35,8 @@
 
 using namespace nfd::tests;
 
-BOOST_AUTO_TEST_SUITE(CsPriorityFifo)
+BOOST_AUTO_TEST_SUITE(Table)
+BOOST_AUTO_TEST_SUITE(TestCsPriorityFifo)
 
 BOOST_FIXTURE_TEST_CASE(EvictOne, UnitTestTimeFixture)
 {
@@ -140,7 +141,8 @@
           bind([] { BOOST_CHECK(true); }));
 }
 
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestCsPriorityFifo
+BOOST_AUTO_TEST_SUITE_END() // Table
 
 } // namespace tests
 } // namespace cs
diff --git a/tests/rib/auto-prefix-propagator.t.cpp b/tests/rib/auto-prefix-propagator.t.cpp
index ebdf94b..5077bab 100644
--- a/tests/rib/auto-prefix-propagator.t.cpp
+++ b/tests/rib/auto-prefix-propagator.t.cpp
@@ -25,8 +25,8 @@
 
 #include "rib/auto-prefix-propagator.hpp"
 
-#include "tests/test-common.hpp"
 #include "tests/identity-management-fixture.hpp"
+
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
 namespace nfd {
@@ -35,13 +35,10 @@
 
 using namespace nfd::tests;
 
-NFD_LOG_INIT("AutoPrefixPropagatorTest");
-
 const Name TEST_LINK_LOCAL_NFD_PREFIX("/localhop/nfd");
 const time::milliseconds TEST_PREFIX_PROPAGATION_TIMEOUT(1000);
 
-class AutoPrefixPropagatorFixture : public IdentityManagementFixture
-                                  , public UnitTestTimeFixture
+class AutoPrefixPropagatorFixture : public IdentityManagementTimeFixture
 {
 public:
   AutoPrefixPropagatorFixture()
@@ -66,7 +63,7 @@
   insertEntryToRib(const Name& name, const uint64_t& faceId = 0)
   {
     if (m_rib.find(name) != m_rib.end()) {
-      NFD_LOG_INFO("RIB entry already exists: " << name);
+      BOOST_TEST_MESSAGE("RIB entry already exists: " + name.toUri());
       return false;
     }
 
@@ -82,7 +79,7 @@
   eraseEntryFromRib(const Name& name)
   {
     if (m_rib.find(name) == m_rib.end()) {
-      NFD_LOG_INFO("RIB entry does not exist: " << name);
+      BOOST_TEST_MESSAGE("RIB entry does not exist: " + name.toUri());
       return false;
     }
 
@@ -215,8 +212,6 @@
   return os;
 }
 
-BOOST_AUTO_TEST_SUITE(Rib)
-
 BOOST_FIXTURE_TEST_SUITE(TestAutoPrefixPropagator, AutoPrefixPropagatorFixture)
 
 BOOST_AUTO_TEST_CASE(EnableDisable)
@@ -277,8 +272,6 @@
   BOOST_CHECK_EQUAL(m_propagator.m_maxRetryWait, time::seconds(55));
 }
 
-BOOST_AUTO_TEST_SUITE(Helpers)
-
 BOOST_AUTO_TEST_CASE(GetPrefixPropagationParameters)
 {
   BOOST_REQUIRE(addIdentity("/test/A"));
@@ -365,8 +358,6 @@
   BOOST_CHECK(m_entries.find("test/B/C") == m_entries.end());
 }
 
-BOOST_AUTO_TEST_SUITE_END() // Helpers
-
 BOOST_AUTO_TEST_SUITE(PropagateRevokeSemantics)
 
 BOOST_AUTO_TEST_CASE(Basic)
@@ -684,7 +675,6 @@
 BOOST_AUTO_TEST_SUITE_END() // PropagatedEntryStateChanges
 
 BOOST_AUTO_TEST_SUITE_END() // TestAutoPrefixPropagator
-BOOST_AUTO_TEST_SUITE_END() // Rib
 
 } // namespace tests
 } // namespace rib
diff --git a/tests/rib/fib-updates-common.hpp b/tests/rib/fib-updates-common.hpp
index 1f293c6..df41c3e 100644
--- a/tests/rib/fib-updates-common.hpp
+++ b/tests/rib/fib-updates-common.hpp
@@ -33,8 +33,6 @@
 namespace rib {
 namespace tests {
 
-using namespace nfd::tests;
-
 inline bool
 compareNameFaceIdCostAction(const FibUpdate& lhs, const FibUpdate& rhs)
 {
@@ -58,7 +56,7 @@
   return false;
 }
 
-class FibUpdatesFixture : public IdentityManagementFixture
+class FibUpdatesFixture : public nfd::tests::IdentityManagementFixture
 {
 public:
   FibUpdatesFixture()
@@ -168,9 +166,9 @@
 public:
   ndn::util::DummyClientFace face;
   ndn::nfd::Controller controller;
-  rib::FibUpdater fibUpdater;
-  rib::Rib rib;
 
+  Rib rib;
+  FibUpdater fibUpdater;
   FibUpdater::FibUpdateList fibUpdates;
 };
 
diff --git a/tests/rib/propagated-entry.t.cpp b/tests/rib/propagated-entry.t.cpp
index 8c8b1d2..fe43677 100644
--- a/tests/rib/propagated-entry.t.cpp
+++ b/tests/rib/propagated-entry.t.cpp
@@ -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-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -24,14 +24,13 @@
  */
 
 #include "rib/propagated-entry.hpp"
+
 #include "tests/test-common.hpp"
 
 namespace nfd {
 namespace rib {
 namespace tests {
 
-BOOST_AUTO_TEST_SUITE(Rib)
-
 BOOST_FIXTURE_TEST_SUITE(TestPropagatedEntry, nfd::tests::BaseFixture)
 
 BOOST_AUTO_TEST_CASE(Identity)
@@ -81,7 +80,6 @@
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestPropagatedEntry
-BOOST_AUTO_TEST_SUITE_END() // Rib
 
 } // namespace tests
 } // namespace rib
diff --git a/tests/rib/rib-manager.t.cpp b/tests/rib/rib-manager.t.cpp
index 450016d..dfbeb29 100644
--- a/tests/rib/rib-manager.t.cpp
+++ b/tests/rib/rib-manager.t.cpp
@@ -265,7 +265,6 @@
   return os;
 }
 
-BOOST_AUTO_TEST_SUITE(Rib)
 BOOST_AUTO_TEST_SUITE(TestRibManager)
 
 class AddTopPrefixFixture : public RibManagerFixture
@@ -611,7 +610,6 @@
 BOOST_AUTO_TEST_SUITE_END() // FaceMonitor
 
 BOOST_AUTO_TEST_SUITE_END() // TestRibManager
-BOOST_AUTO_TEST_SUITE_END() // Rib
 
 } // namespace tests
 } // namespace rib
diff --git a/tests/rib/rib-update.cpp b/tests/rib/rib-update.t.cpp
similarity index 93%
rename from tests/rib/rib-update.cpp
rename to tests/rib/rib-update.t.cpp
index c7b1c6c..f40730f 100644
--- a/tests/rib/rib-update.cpp
+++ b/tests/rib/rib-update.t.cpp
@@ -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-2016,  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 "tests/test-common.hpp"
-#include "rib-test-common.hpp"
-
 #include "rib/rib-update.hpp"
 #include "rib/rib-update-batch.hpp"
 
+#include "rib-test-common.hpp"
+#include "tests/test-common.hpp"
+
 namespace nfd {
 namespace rib {
 namespace tests {
 
-BOOST_FIXTURE_TEST_SUITE(RibRibUpdate, nfd::tests::BaseFixture)
+BOOST_FIXTURE_TEST_SUITE(TestRibUpdate, nfd::tests::BaseFixture)
 
 BOOST_AUTO_TEST_CASE(BatchBasic)
 {
@@ -77,8 +77,7 @@
   BOOST_CHECK(it == batch.end());
 }
 
-
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestRibUpdate
 
 } // namespace tests
 } // namespace rib
diff --git a/tests/rib/rib.t.cpp b/tests/rib/rib.t.cpp
index 91445c4..eed09f9 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; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -24,10 +24,11 @@
  */
 
 #include "rib/rib.hpp"
-#include <ndn-cxx/encoding/tlv-nfd.hpp>
 
 #include "tests/test-common.hpp"
 
+#include <ndn-cxx/encoding/tlv-nfd.hpp>
+
 namespace nfd {
 namespace rib {
 namespace tests {
@@ -294,7 +295,7 @@
   BOOST_CHECK_EQUAL(rib.size(), 1);
 }
 
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestRib
 
 } // namespace tests
 } // namespace rib
