diff --git a/tests/boost-multi-log-formatter.hpp b/tests/boost-multi-log-formatter.hpp
new file mode 100644
index 0000000..ae37416
--- /dev/null
+++ b/tests/boost-multi-log-formatter.hpp
@@ -0,0 +1,214 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2015 Regents of the University of California.
+ *
+ * Based on work by Martin Ba (http://stackoverflow.com/a/26718189)
+ *
+ * This file is distributed under the Boost Software License, Version 1.0.
+ * (See http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#ifndef NDN_TESTS_BOOST_MULTI_LOG_FORMATTER_HPP
+#define NDN_TESTS_BOOST_MULTI_LOG_FORMATTER_HPP
+
+#include <boost/version.hpp>
+
+#if BOOST_VERSION >= 105900
+#include <boost/test/unit_test_parameters.hpp>
+#else
+#include <boost/test/detail/unit_test_parameters.hpp>
+#endif // BOOST_VERSION >= 105900
+
+#include <boost/test/unit_test_log_formatter.hpp>
+#include <boost/test/output/compiler_log_formatter.hpp>
+#include <boost/test/output/xml_log_formatter.hpp>
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+/**
+ * @brief Log formatter for Boost.Test that outputs the logging to multiple formatters
+ *
+ * The log formatter is designed to output to one or multiple formatters at the same time.  For
+ * example, one HRF formatter can output to the standard output, while XML formatter output to
+ * the file.
+ *
+ * Usage:
+ *
+ *     // Call in init_unit_test_suite: (this will override the --log_format parameter)
+ *     auto formatter = new boost::unit_test::output::multi_log_formatter; // same as already configured logger
+ *
+ *     // Prepare and add additional logger(s)
+ *     formatter.add(std::make_shared<boost::unit_test::output::xml_log_formatter>(),
+ *                   std::make_shared<std::ofstream>("out.xml"));
+ *
+ *      boost::unit_test::unit_test_log.set_formatter(formatter);
+ *
+ * @note Calling `boost::unit_test::unit_test_log.set_stream(...)` will change the stream for
+ *       the original logger.
+ */
+class multi_log_formatter : public unit_test_log_formatter
+{
+public:
+  /**
+   * @brief Create instance of the logger, based on the configured logger instance
+   */
+  multi_log_formatter()
+  {
+    auto format =
+#if BOOST_VERSION > 105900
+      runtime_config::get<output_format>(runtime_config::LOG_FORMAT);
+#else
+      runtime_config::log_format();
+#endif // BOOST_VERSION > 105900
+
+    switch (format) {
+      default:
+#if BOOST_VERSION >= 105900
+      case OF_CLF:
+#else
+      case CLF:
+#endif // BOOST_VERSION >= 105900
+        m_loggers.push_back({std::make_shared<compiler_log_formatter>(), nullptr});
+        break;
+#if BOOST_VERSION >= 105900
+      case OF_XML:
+#else
+      case XML:
+#endif // BOOST_VERSION >= 105900
+        m_loggers.push_back({std::make_shared<xml_log_formatter>(), nullptr});
+        break;
+    }
+  }
+
+  void
+  add(std::shared_ptr<unit_test_log_formatter> formatter, std::shared_ptr<std::ostream> os)
+  {
+    m_loggers.push_back({formatter, os});
+  }
+
+  // Formatter interface
+  void
+  log_start(std::ostream& os, counter_t test_cases_amount)
+  {
+    for (auto& l : m_loggers)
+      l.logger->log_start(l.os == nullptr ? os : *l.os, test_cases_amount);
+  }
+
+  void
+  log_finish(std::ostream& os)
+  {
+    for (auto& l : m_loggers)
+      l.logger->log_finish(l.os == nullptr ? os : *l.os);
+  }
+
+  void
+  log_build_info(std::ostream& os)
+  {
+    for (auto& l : m_loggers)
+      l.logger->log_build_info(l.os == nullptr ? os : *l.os);
+  }
+
+  void
+  test_unit_start(std::ostream& os, const test_unit& tu)
+  {
+    for (auto& l : m_loggers)
+      l.logger->test_unit_start(l.os == nullptr ? os : *l.os, tu);
+  }
+
+  void
+  test_unit_finish(std::ostream& os, const test_unit& tu, unsigned long elapsed)
+  {
+    for (auto& l : m_loggers)
+      l.logger->test_unit_finish(l.os == nullptr ? os : *l.os, tu, elapsed);
+  }
+
+  void
+  test_unit_skipped(std::ostream& os, const test_unit& tu)
+  {
+    for (auto& l : m_loggers)
+      l.logger->test_unit_skipped(l.os == nullptr ? os : *l.os, tu);
+  }
+
+#if BOOST_VERSION >= 105900
+  void
+  log_exception_start(std::ostream& os, const log_checkpoint_data& lcd, const execution_exception& ex)
+  {
+    for (auto& l : m_loggers)
+      l.logger->log_exception_start(l.os == nullptr ? os : *l.os, lcd, ex);
+  }
+
+  void
+  log_exception_finish(std::ostream& os)
+  {
+    for (auto& l : m_loggers)
+      l.logger->log_exception_finish(l.os == nullptr ? os : *l.os);
+  }
+#else
+  void
+  log_exception(std::ostream& os, const log_checkpoint_data& lcd, const execution_exception& ex)
+  {
+    for (auto& l : m_loggers)
+      l.logger->log_exception(l.os == nullptr ? os : *l.os, lcd, ex);
+  }
+#endif // BOOST_VERSION >= 105900
+
+  void
+  log_entry_start(std::ostream& os, const log_entry_data& entry_data, log_entry_types let)
+  {
+    for (auto& l : m_loggers)
+      l.logger->log_entry_start(l.os == nullptr ? os : *l.os, entry_data, let);
+  }
+
+  void
+  log_entry_value(std::ostream& os, const_string value)
+  {
+    for (auto& l : m_loggers)
+      l.logger->log_entry_value(l.os == nullptr ? os : *l.os, value);
+  }
+
+  void
+  log_entry_finish(std::ostream& os)
+  {
+    for (auto& l : m_loggers)
+      l.logger->log_entry_finish(l.os == nullptr ? os : *l.os);
+  }
+
+#if BOOST_VERSION >= 105900
+  void
+  entry_context_start(std::ostream& os, log_level level)
+  {
+    for (auto& l : m_loggers)
+      l.logger->entry_context_start(l.os == nullptr ? os : *l.os, level);
+  }
+
+  void
+  log_entry_context(std::ostream& os, const_string value)
+  {
+    for (auto& l : m_loggers)
+      l.logger->log_entry_context(l.os == nullptr ? os : *l.os, value);
+  }
+
+  void
+  entry_context_finish(std::ostream& os)
+  {
+    for (auto& l : m_loggers)
+      l.logger->entry_context_finish(l.os == nullptr ? os : *l.os);
+  }
+#endif // BOOST_VERSION >= 105900
+
+private:
+  struct LoggerInfo
+  {
+    std::shared_ptr<unit_test_log_formatter> logger;
+    std::shared_ptr<std::ostream> os;
+  };
+  std::vector<LoggerInfo> m_loggers;
+};
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#endif // NDN_TESTS_BOOST_MULTI_LOG_FORMATTER_HPP
diff --git a/tests/boost-test.hpp b/tests/boost-test.hpp
index b900be4..89e67b8 100644
--- a/tests/boost-test.hpp
+++ b/tests/boost-test.hpp
@@ -1,3 +1,29 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service) and is
+ * based on the code written as part of NFD (Named Data Networking Daemon).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #ifndef NDNS_TESTS_BOOST_TEST_HPP
 #define NDNS_TESTS_BOOST_TEST_HPP
 
@@ -5,23 +31,9 @@
 #pragma GCC system_header
 #pragma clang system_header
 
-#include "logger.hpp"
-
 #include <boost/test/test_tools.hpp>
 #include <boost/test/unit_test.hpp>
 #include <boost/concept_check.hpp>
 #include <boost/test/output_test_stream.hpp>
 
-#include <ndn-cxx/name.hpp>
-#include <ndn-cxx/data.hpp>
-#include <ndn-cxx/interest.hpp>
-
-namespace ndn {
-namespace ndns {
-namespace tests {
-
-} //tests
-} //ndns
-} //ndn
-
 #endif // NDN_TESTS_BOOST_TEST_HPP
diff --git a/tests/global-configuration-fixture.cpp b/tests/global-configuration-fixture.cpp
new file mode 100644
index 0000000..25dd100
--- /dev/null
+++ b/tests/global-configuration-fixture.cpp
@@ -0,0 +1,78 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016, Regents of the University of California.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "test-common.hpp"
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+class GlobalConfigurationFixture : boost::noncopyable
+{
+public:
+  GlobalConfigurationFixture()
+  {
+    log::init("unit-tests.log4cxx");
+
+    if (getenv("HOME") != nullptr) {
+      m_home = getenv("HOME");
+    }
+    if (getenv("NDN_CLIENT_PIB") != nullptr) {
+      m_pib = getenv("NDN_CLIENT_PIB");
+    }
+    if (getenv("NDN_CLIENT_TPM") != nullptr) {
+      m_tpm = getenv("NDN_CLIENT_TPM");
+    }
+
+    boost::filesystem::path dir(TEST_CONFIG_PATH);
+    dir /= "test-home";
+    setenv("HOME", dir.generic_string().c_str(), 1);
+
+    setenv("NDN_CLIENT_PIB", "pib-sqlite3", 1);
+    setenv("NDN_CLIENT_TPM", "tpm-file", 1);
+    boost::filesystem::create_directories(dir);
+  }
+
+  ~GlobalConfigurationFixture()
+  {
+    if (!m_home.empty()) {
+      setenv("HOME", m_home.c_str(), 1);
+    }
+    if (!m_pib.empty()) {
+      setenv("NDN_CLIENT_PIB", m_home.c_str(), 1);
+    }
+    if (!m_tpm.empty()) {
+      setenv("NDN_CLIENT_TPM", m_home.c_str(), 1);
+    }
+  }
+
+private:
+  std::string m_home;
+  std::string m_pib;
+  std::string m_tpm;
+};
+
+BOOST_GLOBAL_FIXTURE(GlobalConfigurationFixture)
+#if (BOOST_VERSION >= 105900)
+;
+#endif // BOOST_VERSION >= 105900
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
new file mode 100644
index 0000000..f3e1dbe
--- /dev/null
+++ b/tests/identity-management-fixture.cpp
@@ -0,0 +1,92 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service) and is
+ * based on the code written as part of NFD (Named Data Networking Daemon).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "identity-management-fixture.hpp"
+
+#include <ndn-cxx/util/io.hpp>
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+IdentityManagementFixture::IdentityManagementFixture()
+  : m_keyChain("sqlite3", "file")
+{
+  m_keyChain.getDefaultCertificate(); // side effect: create a default cert if it doesn't exist
+}
+
+IdentityManagementFixture::~IdentityManagementFixture()
+{
+  for (const auto& id : m_identities) {
+    m_keyChain.deleteIdentity(id);
+  }
+
+  boost::system::error_code ec;
+  for (const auto& certFile : m_certFiles) {
+    boost::filesystem::remove(certFile, ec); // ignore error
+  }
+}
+
+bool
+IdentityManagementFixture::addIdentity(const Name& identity, const ndn::KeyParams& params)
+{
+  try {
+    m_keyChain.createIdentity(identity, params);
+    m_identities.push_back(identity);
+    return true;
+  }
+  catch (std::runtime_error&) {
+    return false;
+  }
+}
+
+bool
+IdentityManagementFixture::saveIdentityCertificate(const Name& identity, const std::string& filename, bool wantAdd)
+{
+  shared_ptr<ndn::IdentityCertificate> cert;
+  try {
+    cert = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(identity));
+  }
+  catch (const ndn::SecPublicInfo::Error&) {
+    if (wantAdd && this->addIdentity(identity)) {
+      return this->saveIdentityCertificate(identity, filename, false);
+    }
+    return false;
+  }
+
+  m_certFiles.push_back(filename);
+  try {
+    ndn::io::save(*cert, filename);
+    return true;
+  }
+  catch (const ndn::io::Error&) {
+    return false;
+  }
+}
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
diff --git a/tests/identity-management-fixture.hpp b/tests/identity-management-fixture.hpp
new file mode 100644
index 0000000..63c7fb7
--- /dev/null
+++ b/tests/identity-management-fixture.hpp
@@ -0,0 +1,83 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service) and is
+ * based on the code written as part of NFD (Named Data Networking Daemon).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NDNS_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+#define NDNS_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+
+#include "test-common.hpp"
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+/** \brief a fixture that cleans up KeyChain identities and certificate files upon destruction
+ */
+class IdentityManagementFixture : public virtual BaseFixture
+{
+public:
+  IdentityManagementFixture();
+
+  /** \brief deletes created identities and saved certificate files
+   */
+  ~IdentityManagementFixture();
+
+  /** \brief add identity
+   *  \return whether successful
+   */
+  bool
+  addIdentity(const Name& identity,
+              const ndn::KeyParams& params = ndn::KeyChain::DEFAULT_KEY_PARAMS);
+
+  /** \brief save identity certificate to a file
+   *  \param identity identity name
+   *  \param filename file name, should be writable
+   *  \param wantAdd if true, add new identity when necessary
+   *  \return whether successful
+   */
+  bool
+  saveIdentityCertificate(const Name& identity, const std::string& filename, bool wantAdd = false);
+
+protected:
+  ndn::KeyChain m_keyChain;
+
+private:
+  std::vector<ndn::Name> m_identities;
+  std::vector<std::string> m_certFiles;
+};
+
+/** \brief convenience base class for inheriting from both UnitTestTimeFixture
+ *         and IdentityManagementFixture
+ */
+class IdentityManagementTimeFixture : public UnitTestTimeFixture
+                                    , public IdentityManagementFixture
+{
+};
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
+
+#endif // NDNS_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
diff --git a/tests/main.cpp b/tests/main.cpp
index f9bf6b6..368f405 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -1,8 +1,15 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, 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,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
  *
- * This file is part of NDNS (Named Data Networking Domain Name Service).
+ * This file is part of NDNS (Named Data Networking Domain Name Service) and is
+ * based on the code written as part of NFD (Named Data Networking Daemon).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
  *
  * NDNS is free software: you can redistribute it and/or modify it under the terms
@@ -17,59 +24,93 @@
  * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#define BOOST_TEST_MAIN 1
-#define BOOST_TEST_DYN_LINK 1
-
-#include "config.hpp"
-#include "logger.hpp"
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_ALTERNATIVE_INIT_API
 
 #include <boost/version.hpp>
-#include <boost/test/unit_test.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/filesystem.hpp>
+
+#if BOOST_VERSION >= 106200
+// Boost.Test v3.3 (Boost 1.62) natively supports multi-logger output
+#include "boost-test.hpp"
+#else
+#define BOOST_TEST_NO_MAIN
+#include "boost-test.hpp"
+
+#include "boost-multi-log-formatter.hpp"
+
+#include <boost/program_options/options_description.hpp>
+#include <boost/program_options/variables_map.hpp>
+#include <boost/program_options/parsers.hpp>
 
 #include <fstream>
 #include <iostream>
 
-namespace ndn {
-namespace ndns {
-namespace tests {
-
-class GlobalConfigurationFixture : boost::noncopyable
+static bool
+init_tests()
 {
-public:
-  GlobalConfigurationFixture()
-  {
-    log::init("unit-tests.log4cxx");
+  init_unit_test();
 
-    if (std::getenv("HOME"))
-      m_home = std::getenv("HOME");
+  namespace po = boost::program_options;
+  namespace ut = boost::unit_test;
 
-    boost::filesystem::path dir(TEST_CONFIG_PATH);
-    dir /= "test-home";
-    setenv("HOME", dir.generic_string().c_str(), 1);
-    boost::filesystem::create_directories(dir);
-    std::ofstream clientConf((dir / ".ndn" / "client.conf").generic_string().c_str());
-    clientConf << "pib=pib-sqlite3\n"
-               << "tpm=tpm-file" << std::endl;
+  po::options_description extraOptions;
+  std::string logger;
+  std::string outputFile = "-";
+  extraOptions.add_options()
+    ("log_format2", po::value<std::string>(&logger), "Type of second log formatter: HRF or XML")
+    ("log_sink2", po::value<std::string>(&outputFile)->default_value(outputFile), "Second log sink, - for stdout")
+    ;
+  po::variables_map vm;
+  try {
+    po::store(po::command_line_parser(ut::framework::master_test_suite().argc,
+                                      ut::framework::master_test_suite().argv)
+                .options(extraOptions)
+                .run(),
+              vm);
+    po::notify(vm);
+  }
+  catch (const std::exception& e) {
+    std::cerr << "ERROR: " << e.what() << "\n"
+              << extraOptions << std::endl;
+    return false;
   }
 
-  ~GlobalConfigurationFixture()
-  {
-    if (!m_home.empty()) {
-      setenv("HOME", m_home.c_str(), 1);
-    }
+  if (vm.count("log_format2") == 0) {
+    // second logger is not configured
+    return true;
   }
 
-private:
-  std::string m_home;
-};
+  std::shared_ptr<ut::unit_test_log_formatter> formatter;
+  if (logger == "XML") {
+    formatter = std::make_shared<ut::output::xml_log_formatter>();
+  }
+  else if (logger == "HRF") {
+    formatter = std::make_shared<ut::output::compiler_log_formatter>();
+  }
+  else {
+    std::cerr << "ERROR: only HRF or XML log formatter can be specified" << std::endl;
+    return false;
+  }
 
-BOOST_GLOBAL_FIXTURE(GlobalConfigurationFixture)
-#if (BOOST_VERSION >= 105900)
-;
-#endif // BOOST_VERSION >= 105900
+  std::shared_ptr<std::ostream> output;
+  if (outputFile == "-") {
+    output = std::shared_ptr<std::ostream>(&std::cout, std::bind([]{}));
+  }
+  else {
+    output = std::make_shared<std::ofstream>(outputFile.c_str());
+  }
 
-} // namespace tests
-} // namespace ndns
-} // namespace ndn
+  auto multiFormatter = new ut::output::multi_log_formatter;
+  multiFormatter->add(formatter, output);
+  ut::unit_test_log.set_formatter(multiFormatter);
+
+  return true;
+}
+
+int
+main(int argc, char* argv[])
+{
+  return ::boost::unit_test::unit_test_main(&init_tests, argc, argv);
+}
+
+#endif // BOOST_VERSION >= 106200
diff --git a/tests/test-common.cpp b/tests/test-common.cpp
new file mode 100644
index 0000000..e929ab1
--- /dev/null
+++ b/tests/test-common.cpp
@@ -0,0 +1,83 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service) and is
+ * based on the code written as part of NFD (Named Data Networking Daemon).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "test-common.hpp"
+
+#include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+shared_ptr<Interest>
+makeInterest(const Name& name, uint32_t nonce)
+{
+  auto interest = make_shared<Interest>(name);
+  if (nonce != 0) {
+    interest->setNonce(nonce);
+  }
+  return interest;
+}
+
+shared_ptr<Data>
+makeData(const Name& name)
+{
+  auto data = make_shared<Data>(name);
+  return signData(data);
+}
+
+Data&
+signData(Data& data)
+{
+  ndn::SignatureSha256WithRsa fakeSignature;
+  fakeSignature.setValue(ndn::encoding::makeEmptyBlock(tlv::SignatureValue));
+  data.setSignature(fakeSignature);
+  data.wireEncode();
+
+  return data;
+}
+
+shared_ptr<Link>
+makeLink(const Name& name, std::initializer_list<std::pair<uint32_t, Name>> delegations)
+{
+  auto link = make_shared<Link>(name, delegations);
+  signData(link);
+  return link;
+}
+
+lp::Nack
+makeNack(const Name& name, uint32_t nonce, lp::NackReason reason)
+{
+  Interest interest(name);
+  interest.setNonce(nonce);
+  lp::Nack nack(std::move(interest));
+  nack.setReason(reason);
+  return nack;
+}
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
new file mode 100644
index 0000000..5b58297
--- /dev/null
+++ b/tests/test-common.hpp
@@ -0,0 +1,126 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service) and is
+ * based on the code written as part of NFD (Named Data Networking Daemon).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NDNS_TESTS_TEST_COMMON_HPP
+#define NDNS_TESTS_TEST_COMMON_HPP
+
+#include "logger.hpp"
+
+#include <ndn-cxx/name.hpp>
+#include <ndn-cxx/data.hpp>
+#include <ndn-cxx/interest.hpp>
+#include <ndn-cxx/link.hpp>
+#include <ndn-cxx/lp/nack.hpp>
+#include <ndn-cxx/util/dummy-client-face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+
+#include <boost/version.hpp>
+#include <boost/asio.hpp>
+#include <boost/filesystem.hpp>
+
+#include <fstream>
+
+#include "boost-test.hpp"
+#include "unit-test-common-fixtures.hpp"
+#include "identity-management-fixture.hpp"
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+/** \brief create an Interest
+ *  \param name Interest name
+ *  \param nonce if non-zero, set Nonce to this value
+ *               (useful for creating Nack with same Nonce)
+ */
+shared_ptr<Interest>
+makeInterest(const Name& name, uint32_t nonce = 0);
+
+/** \brief create a Data with fake signature
+ *  \note Data may be modified afterwards without losing the fake signature.
+ *        If a real signature is desired, sign again with KeyChain.
+ */
+shared_ptr<Data>
+makeData(const Name& name);
+
+/** \brief add a fake signature to Data
+ */
+Data&
+signData(Data& data);
+
+/** \brief add a fake signature to Data
+ */
+inline shared_ptr<Data>
+signData(shared_ptr<Data> data)
+{
+  signData(*data);
+  return data;
+}
+
+/** \brief create a Link object with fake signature
+ *  \note Link may be modified afterwards without losing the fake signature.
+ *        If a real signature is desired, sign again with KeyChain.
+ */
+shared_ptr<Link>
+makeLink(const Name& name, std::initializer_list<std::pair<uint32_t, Name>> delegations);
+
+/** \brief create a Nack
+ *  \param name Interest name
+ *  \param nonce Interest nonce
+ *  \param reason Nack reason
+ */
+lp::Nack
+makeNack(const Name& name, uint32_t nonce, lp::NackReason reason);
+
+/** \brief replace a name component
+ *  \param[inout] name name
+ *  \param index name component index
+ *  \param a arguments to name::Component constructor
+ */
+template<typename...A>
+void
+setNameComponent(Name& name, ssize_t index, const A& ...a)
+{
+  Name name2 = name.getPrefix(index);
+  name2.append(name::Component(a...));
+  name2.append(name.getSubName(name2.size()));
+  name = name2;
+}
+
+template<typename Packet, typename...A>
+void
+setNameComponent(Packet& packet, ssize_t index, const A& ...a)
+{
+  Name name = packet.getName();
+  setNameComponent(name, index, a...);
+  packet.setName(name);
+}
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
+
+#endif // NFD_TESTS_TEST_COMMON_HPP
diff --git a/tests/unit-test-common-fixtures.cpp b/tests/unit-test-common-fixtures.cpp
new file mode 100644
index 0000000..f16e027
--- /dev/null
+++ b/tests/unit-test-common-fixtures.cpp
@@ -0,0 +1,82 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service) and is
+ * based on the code written as part of NFD (Named Data Networking Daemon).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "test-common.hpp"
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+BaseFixture::BaseFixture()
+{
+}
+
+UnitTestTimeFixture::UnitTestTimeFixture()
+  : steadyClock(make_shared<time::UnitTestSteadyClock>())
+  , systemClock(make_shared<time::UnitTestSystemClock>())
+{
+  time::setCustomClocks(steadyClock, systemClock);
+}
+
+UnitTestTimeFixture::~UnitTestTimeFixture()
+{
+  time::setCustomClocks(nullptr, nullptr);
+}
+
+void
+UnitTestTimeFixture::advanceClocks(const time::nanoseconds& tick, size_t nTicks)
+{
+  this->advanceClocks(tick, tick * nTicks);
+}
+
+void
+UnitTestTimeFixture::advanceClocks(const time::nanoseconds& tick, const time::nanoseconds& total)
+{
+  BOOST_ASSERT(tick > time::nanoseconds::zero());
+  BOOST_ASSERT(total >= time::nanoseconds::zero());
+
+  time::nanoseconds remaining = total;
+  while (remaining > time::nanoseconds::zero()) {
+    if (remaining >= tick) {
+      steadyClock->advance(tick);
+      systemClock->advance(tick);
+      remaining -= tick;
+    }
+    else {
+      steadyClock->advance(remaining);
+      systemClock->advance(remaining);
+      remaining = time::nanoseconds::zero();
+    }
+
+    if (m_io.stopped())
+      m_io.reset();
+    m_io.poll();
+  }
+}
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
diff --git a/tests/unit-test-common-fixtures.hpp b/tests/unit-test-common-fixtures.hpp
new file mode 100644
index 0000000..dfed49d
--- /dev/null
+++ b/tests/unit-test-common-fixtures.hpp
@@ -0,0 +1,97 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service) and is
+ * based on the code written as part of NFD (Named Data Networking Daemon).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NDNS_TESTS_UNIT_TEST_COMMON_FIXTURES_HPP
+#define NDNS_TESTS_UNIT_TEST_COMMON_FIXTURES_HPP
+
+#include "boost-test.hpp"
+
+#include <ndn-cxx/util/time-unit-test-clock.hpp>
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+/** \brief base test fixture
+ *
+ *  Every test case should be based on this fixture,
+ *  to have per test case io_service initialization.
+ */
+class BaseFixture
+{
+protected:
+  BaseFixture();
+
+protected:
+  /** \brief reference to global io_service
+   */
+  boost::asio::io_service m_io;
+};
+
+/** \brief a base test fixture that overrides steady clock and system clock
+ */
+class UnitTestTimeFixture : public virtual BaseFixture
+{
+protected:
+  UnitTestTimeFixture();
+
+  ~UnitTestTimeFixture();
+
+  /** \brief advance steady and system clocks
+   *
+   *  Clocks are advanced in increments of \p tick for \p nTicks ticks.
+   *  After each tick, global io_service is polled to process pending I/O events.
+   *
+   *  Exceptions thrown during I/O events are propagated to the caller.
+   *  Clock advancing would stop in case of an exception.
+   */
+  void
+  advanceClocks(const time::nanoseconds& tick, size_t nTicks = 1);
+
+  /** \brief advance steady and system clocks
+   *
+   *  Clocks are advanced in increments of \p tick for \p total time.
+   *  The last increment might be shorter than \p tick.
+   *  After each tick, global io_service is polled to process pending I/O events.
+   *
+   *  Exceptions thrown during I/O events are propagated to the caller.
+   *  Clock advancing would stop in case of an exception.
+   */
+  void
+  advanceClocks(const time::nanoseconds& tick, const time::nanoseconds& total);
+
+protected:
+  shared_ptr<time::UnitTestSteadyClock> steadyClock;
+  shared_ptr<time::UnitTestSystemClock> systemClock;
+
+  friend class LimitedIo;
+};
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
+
+#endif // NDNS_TESTS_UNIT_TEST_COMMON_FIXTURES_HPP
diff --git a/tests/unit/clients/iterative-query-controller.cpp b/tests/unit/clients/iterative-query-controller.cpp
index a34375b..93bbb4e 100644
--- a/tests/unit/clients/iterative-query-controller.cpp
+++ b/tests/unit/clients/iterative-query-controller.cpp
@@ -19,13 +19,9 @@
 
 #include "clients/iterative-query-controller.hpp"
 #include "daemon/name-server.hpp"
-#include "logger.hpp"
-#include "../database-test-data.hpp"
-#include "../../boost-test.hpp"
 
-#include <ndn-cxx/util/dummy-client-face.hpp>
-
-#include <boost/asio.hpp>
+#include "test-common.hpp"
+#include "unit/database-test-data.hpp"
 
 namespace ndn {
 namespace ndns {
diff --git a/tests/unit/clients/query.cpp b/tests/unit/clients/query.cpp
index 6fdca35..40fdfc3 100644
--- a/tests/unit/clients/query.cpp
+++ b/tests/unit/clients/query.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -19,7 +19,7 @@
 
 #include "clients/query.hpp"
 
-#include "../../boost-test.hpp"
+#include "test-common.hpp"
 
 namespace ndn {
 namespace ndns {
@@ -69,6 +69,6 @@
 
 BOOST_AUTO_TEST_SUITE_END()
 
-}// namespace tests
-}// namespace ndns
+} // namespace tests
+} // namespace ndns
 } // namespace ndn
diff --git a/tests/unit/clients/response.cpp b/tests/unit/clients/response.cpp
index 7332c35..5950063 100644
--- a/tests/unit/clients/response.cpp
+++ b/tests/unit/clients/response.cpp
@@ -18,20 +18,17 @@
  */
 
 #include "clients/response.hpp"
-#include <ndn-cxx/security/key-chain.hpp>
-#include "../../boost-test.hpp"
+
+#include "test-common.hpp"
 
 namespace ndn {
 namespace ndns {
 namespace tests {
 
-
-
-BOOST_AUTO_TEST_SUITE(Response)
+BOOST_FIXTURE_TEST_SUITE(Response, IdentityManagementFixture)
 
 BOOST_AUTO_TEST_CASE(Basic)
 {
-  KeyChain keyChain("sqlite3", "file");
   Name hint;
   Name zone("/net");
   name::Component qType = ndns::label::NDNS_ITERATIVE_QUERY;
@@ -54,7 +51,7 @@
 
   //const Block& block = r.wireEncode();
   shared_ptr<Data> data = r.toData();
-  // keyChain.sign(*data);
+  // m_keyChain.sign(*data);
 
   ndns::Response r2;
   BOOST_CHECK_EQUAL(r2.fromData(hint, zone, *data), true);
@@ -75,7 +72,7 @@
   BOOST_CHECK_NE(r2, r4);
 
   data = r4.toData();
-  // keyChain.sign(*data);
+  // m_keyChain.sign(*data);
 
   ndns::Response r5(zone, qType);
 
diff --git a/tests/unit/daemon/db-mgr.cpp b/tests/unit/daemon/db-mgr.cpp
index 4b628b3..09fdc9f 100644
--- a/tests/unit/daemon/db-mgr.cpp
+++ b/tests/unit/daemon/db-mgr.cpp
@@ -17,14 +17,11 @@
  * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "config.hpp"
 #include "daemon/db-mgr.hpp"
-#include "logger.hpp"
 
-#include "../../boost-test.hpp"
-#include <boost/filesystem.hpp>
+#include <algorithm>
 
-#include <algorithm>    // std::sort
+#include "test-common.hpp"
 
 namespace ndn {
 namespace ndns {
diff --git a/tests/unit/daemon/name-server.cpp b/tests/unit/daemon/name-server.cpp
index 6a9be97..820dbd2 100644
--- a/tests/unit/daemon/name-server.cpp
+++ b/tests/unit/daemon/name-server.cpp
@@ -17,18 +17,13 @@
  * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "daemon/db-mgr.hpp"
 #include "daemon/name-server.hpp"
+#include "daemon/db-mgr.hpp"
 #include "clients/response.hpp"
 #include "clients/query.hpp"
-#include "logger.hpp"
 
-#include "../database-test-data.hpp"
-#include "../../boost-test.hpp"
-
-#include <boost/filesystem.hpp>
-#include <ndn-cxx/face.hpp>
-#include <ndn-cxx/util/dummy-client-face.hpp>
+#include "test-common.hpp"
+#include "unit/database-test-data.hpp"
 
 namespace ndn {
 namespace ndns {
diff --git a/tests/unit/daemon/rrset.cpp b/tests/unit/daemon/rrset.cpp
index ddcff15..c71fe0b 100644
--- a/tests/unit/daemon/rrset.cpp
+++ b/tests/unit/daemon/rrset.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -18,9 +18,8 @@
  */
 
 #include "daemon/rrset.hpp"
-#include "../../boost-test.hpp"
 
-#include <ndn-cxx/name.hpp>
+#include "test-common.hpp"
 
 namespace ndn {
 namespace ndns {
diff --git a/tests/unit/daemon/zone.cpp b/tests/unit/daemon/zone.cpp
index 3d60cd2..ae13d36 100644
--- a/tests/unit/daemon/zone.cpp
+++ b/tests/unit/daemon/zone.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -18,9 +18,8 @@
  */
 
 #include "daemon/zone.hpp"
-#include "../../boost-test.hpp"
 
-#include <ndn-cxx/name.hpp>
+#include "test-common.hpp"
 
 namespace ndn {
 namespace ndns {
diff --git a/tests/unit/database-test-data.cpp b/tests/unit/database-test-data.cpp
index 077d09b..90f2587 100644
--- a/tests/unit/database-test-data.cpp
+++ b/tests/unit/database-test-data.cpp
@@ -18,13 +18,11 @@
  */
 
 #include "database-test-data.hpp"
-#include "logger.hpp"
-
-#include <boost/filesystem.hpp>
 
 namespace ndn {
 namespace ndns {
 namespace tests {
+
 NDNS_LOG_INIT("TestFakeData")
 
 const boost::filesystem::path DbTestData::TEST_DATABASE = TEST_CONFIG_PATH "/" "test-ndns.db";
@@ -40,7 +38,6 @@
 
 DbTestData::DbTestData()
   : m_session(TEST_DATABASE.string())
-  , m_keyChain("sqlite3", "file")
 {
   NDNS_LOG_TRACE("start creating test data");
 
diff --git a/tests/unit/database-test-data.hpp b/tests/unit/database-test-data.hpp
index 27f7aaa..104dd5d 100644
--- a/tests/unit/database-test-data.hpp
+++ b/tests/unit/database-test-data.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -25,16 +25,13 @@
 #include "clients/query.hpp"
 #include "validator.hpp"
 
-#include "../boost-test.hpp"
-#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/util/dummy-client-face.hpp>
-#include <boost/filesystem.hpp>
+#include "test-common.hpp"
 
 namespace ndn {
 namespace ndns {
 namespace tests {
 
-class DbTestData
+class DbTestData : public IdentityManagementFixture
 {
 public:
   static const boost::filesystem::path TEST_DATABASE;
@@ -66,7 +63,6 @@
   Zone m_net;
   Zone m_ndnsim;
   DbMgr m_session;
-  KeyChain m_keyChain;
 };
 
 } // namespace tests
diff --git a/tests/unit/logger.cpp b/tests/unit/logger.cpp
index c2491ad..e7ba277 100644
--- a/tests/unit/logger.cpp
+++ b/tests/unit/logger.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -18,14 +18,11 @@
  */
 
 #include "logger.hpp"
-#include "../boost-test.hpp"
-#include "config.hpp"
-
-#include <fstream>
 
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string/classification.hpp>
-#include <boost/filesystem.hpp>
+
+#include "test-common.hpp"
 
 namespace ndn {
 namespace ndns {
diff --git a/tests/unit/mgmt/management-tool.cpp b/tests/unit/mgmt/management-tool.cpp
index 459e9eb..b61ac86 100644
--- a/tests/unit/mgmt/management-tool.cpp
+++ b/tests/unit/mgmt/management-tool.cpp
@@ -17,29 +17,21 @@
  * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "../../src/mgmt/management-tool.hpp"
-
-#include "../../boost-test.hpp"
-#include <boost/test/output_test_stream.hpp>
-using boost::test_tools::output_test_stream;
+#include "mgmt/management-tool.hpp"
 
 #include "ndns-enum.hpp"
 #include "ndns-label.hpp"
 #include "ndns-tlv.hpp"
 
-#include <vector>
-#include <iostream>
-#include <fstream>
-#include <string>
-
-#include <boost/filesystem.hpp>
 #include <boost/algorithm/string/replace.hpp>
 
-#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/security/validator.hpp>
 #include <ndn-cxx/util/io.hpp>
 #include <ndn-cxx/util/regex.hpp>
 
+#include "test-common.hpp"
+
+using boost::test_tools::output_test_stream;
+
 namespace ndn {
 namespace ndns {
 namespace tests {
@@ -50,7 +42,6 @@
 static const boost::filesystem::path TEST_CERTDIR = TEST_CONFIG_PATH "/management_tool_certs";
 static const Name FAKE_ROOT("/fake-root/123456789");
 
-
 /**
  * @brief Recursive copy a directory using Boost Filesystem
  *
@@ -102,7 +93,7 @@
 };
 
 
-class ManagementToolFixture : public TestHome
+class ManagementToolFixture : public TestHome, public IdentityManagementFixture
 {
 public:
   class Error : public std::runtime_error
@@ -126,8 +117,7 @@
   };
 
   ManagementToolFixture()
-    : m_keyChain("sqlite3", "file")
-    , m_tool(TEST_DATABASE.string().c_str(), m_keyChain)
+    : m_tool(TEST_DATABASE.string().c_str(), m_keyChain)
     , m_dbMgr(TEST_DATABASE.string().c_str())
 
     , rootKsk("/KEY/ksk-1416974006376/ID-CERT/%FD%00%00%01I%EA%3Bx%BD")
@@ -204,7 +194,6 @@
 
 public:
   PreviousStateCleaner cleaner; // must be first variable
-  ndn::KeyChain m_keyChain;
   ndns::ManagementTool m_tool;
   ndns::DbMgr m_dbMgr;
 
diff --git a/tests/unit/ndns-label.cpp b/tests/unit/ndns-label.cpp
index 09bb182..719d786 100644
--- a/tests/unit/ndns-label.cpp
+++ b/tests/unit/ndns-label.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -18,7 +18,8 @@
  */
 
 #include "ndns-label.hpp"
-#include "../boost-test.hpp"
+
+#include "test-common.hpp"
 
 namespace ndn {
 namespace ndns {
diff --git a/tests/unit/validator.cpp b/tests/unit/validator.cpp
index b5fcfeb..ff9547f 100644
--- a/tests/unit/validator.cpp
+++ b/tests/unit/validator.cpp
@@ -18,10 +18,8 @@
  */
 
 #include "validator.hpp"
-#include "../boost-test.hpp"
-#include <ndn-cxx/util/dummy-client-face.hpp>
-#include <ndn-cxx/security/key-chain.hpp>
-#include <boost/asio.hpp>
+
+#include "test-common.hpp"
 
 namespace ndn {
 namespace ndns {
@@ -31,7 +29,7 @@
 
 BOOST_AUTO_TEST_SUITE(Validator)
 
-class Fixture
+class Fixture : public IdentityManagementFixture
 {
 public:
   Fixture()
@@ -39,15 +37,9 @@
     , m_testId2("/test02/ndn")
     , m_testId3("/test02/ndn/edu")
     , m_randomId("/test03")
-    , m_keyChain("sqlite3", "file")
     , m_version(name::Component::fromVersion(0))
     , m_face(m_keyChain, {false, true})
   {
-    m_keyChain.deleteIdentity(m_testId1);
-    m_keyChain.deleteIdentity(m_testId2);
-    m_keyChain.deleteIdentity(m_testId3);
-    m_keyChain.deleteIdentity(m_randomId);
-
     m_randomDsk = createRoot(m_randomId); // generate a root cert
 
     m_dsk1 = createRoot(m_testId1); // replace to root cert
@@ -67,10 +59,6 @@
   {
     m_face.getIoService().stop();
     m_face.shutdown();
-    m_keyChain.deleteIdentity(m_testId1);
-    m_keyChain.deleteIdentity(m_testId2);
-    m_keyChain.deleteIdentity(m_testId3);
-    m_keyChain.deleteIdentity(m_randomId);
   }
 
   const Name
@@ -146,8 +134,6 @@
 
   Name m_rootCert;
 
-  KeyChain m_keyChain;
-
   Name m_dsk1;
   Name m_dsk2;
   Name m_dsk3;
@@ -167,8 +153,10 @@
   // validator must be created after root key is saved to the target
   ndns::Validator validator(m_face, TEST_CONFIG_PATH "/" "validator.conf");
 
-  Name dataName(m_testId3);
-  dataName.append("NDNS")
+  Name dataName;
+  dataName
+    .append(m_testId3)
+    .append("NDNS")
     .append("rrLabel")
     .append("rrType")
     .appendVersion();
@@ -190,9 +178,10 @@
 
   BOOST_CHECK_EQUAL(hasValidated, true);
 
-
-  dataName = m_testId2;
-  dataName.append("KEY")
+  dataName = Name();
+  dataName
+    .append(m_testId2)
+    .append("KEY")
     .append("rrLabel")
     .append("ID-CERT")
     .appendVersion();
@@ -214,9 +203,10 @@
   // cannot pass verification due to key's owner's name is longer than data owner's
   BOOST_CHECK_EQUAL(hasValidated, true);
 
-
-  dataName = m_testId3;
-  dataName.append("KEY")
+  dataName = Name();
+  dataName
+    .append(m_testId3)
+    .append("KEY")
     .append("rrLabel")
     .append("ID-CERT")
     .appendVersion();
@@ -238,8 +228,10 @@
   // cannot pass due to self-sign cert is used
   BOOST_CHECK_EQUAL(hasValidated, true);
 
-  dataName = m_testId2;
-  dataName.append("KEY")
+  dataName = Name();
+  dataName
+    .append(m_testId2)
+    .append("KEY")
     .append("rrLabel")
     .append("ID-CERT")
     .appendVersion();
diff --git a/tests/wscript b/tests/wscript
index 58de95d..a44fede 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -41,6 +41,7 @@
         features='cxx cxxprogram',
         source=bld.path.ant_glob(['**/*.cpp'], excl=['main.cpp']),
         use='ndns-objects unit-tests-main BOOST',
+        includes='../src .',
         install_path=None,
         defines='TEST_CONFIG_PATH=\"%s/conf-test\"' %(bld.bldnode)
     )
