diff --git a/tests/daemon/mgmt/face-manager-process-config.t.cpp b/tests/daemon/mgmt/face-manager-process-config.t.cpp
index b5a7312..0b1a156 100644
--- a/tests/daemon/mgmt/face-manager-process-config.t.cpp
+++ b/tests/daemon/mgmt/face-manager-process-config.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,7 @@
 #include "face/ethernet-factory.hpp"
 #endif // HAVE_LIBPCAP
 
-#include "manager-common-fixture.hpp"
+#include "nfd-manager-common-fixture.hpp"
 
 namespace nfd {
 namespace tests {
@@ -38,7 +38,7 @@
 BOOST_AUTO_TEST_SUITE(Mgmt)
 BOOST_AUTO_TEST_SUITE(TestFaceManager)
 
-class FaceManagerProcessConfigFixture : public ManagerCommonFixture
+class FaceManagerProcessConfigFixture : public NfdManagerCommonFixture
 {
 public:
   FaceManagerProcessConfigFixture()
diff --git a/tests/daemon/mgmt/face-manager.t.cpp b/tests/daemon/mgmt/face-manager.t.cpp
index a8f3015..d3e0b34 100644
--- a/tests/daemon/mgmt/face-manager.t.cpp
+++ b/tests/daemon/mgmt/face-manager.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,7 +24,7 @@
  */
 
 #include "mgmt/face-manager.hpp"
-#include "manager-common-fixture.hpp"
+#include "nfd-manager-common-fixture.hpp"
 #include "../face/dummy-face.hpp"
 #include "face/tcp-factory.hpp"
 #include "face/udp-factory.hpp"
@@ -39,15 +39,14 @@
 
 BOOST_AUTO_TEST_SUITE(Mgmt)
 
-
-class FaceManagerFixture : public ManagerCommonFixture
+class FaceManagerFixture : public NfdManagerCommonFixture
 {
 public:
   FaceManagerFixture()
     : m_faceTable(m_forwarder.getFaceTable())
     , m_manager(m_faceTable, m_dispatcher, m_validator)
   {
-    setTopPrefixAndPrivilege("/localhost/nfd", "faces");
+    setPrivilege("faces");
   }
 
 public:
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 87856ed..ee56cf7 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.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,7 +24,7 @@
  */
 #include "mgmt/fib-manager.hpp"
 
-#include "manager-common-fixture.hpp"
+#include "nfd-manager-common-fixture.hpp"
 #include "table/fib-nexthop.hpp"
 #include "../face/dummy-face.hpp"
 #include <ndn-cxx/management/nfd-fib-entry.hpp>
@@ -32,7 +32,7 @@
 namespace nfd {
 namespace tests {
 
-class FibManagerFixture : public ManagerCommonFixture
+class FibManagerFixture : public NfdManagerCommonFixture
 {
 public:
   FibManagerFixture()
@@ -40,7 +40,7 @@
     , m_faceTable(m_forwarder.getFaceTable())
     , m_manager(m_fib, bind(&Forwarder::getFace, &m_forwarder, _1), m_dispatcher, m_validator)
   {
-    setTopPrefixAndPrivilege("/localhost/nfd", "fib");
+    setPrivilege("fib");
   }
 
 public: // for test
diff --git a/tests/daemon/mgmt/forwarder-status-manager.t.cpp b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
index cf19880..c38482b 100644
--- a/tests/daemon/mgmt/forwarder-status-manager.t.cpp
+++ b/tests/daemon/mgmt/forwarder-status-manager.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,
@@ -26,21 +26,21 @@
 #include "mgmt/forwarder-status-manager.hpp"
 #include "version.hpp"
 
-#include "manager-common-fixture.hpp"
+#include "nfd-manager-common-fixture.hpp"
 
 namespace nfd {
 namespace tests {
 
 BOOST_AUTO_TEST_SUITE(Mgmt)
 
-class ForwarderStatusManagerFixture : public ManagerCommonFixture
+class ForwarderStatusManagerFixture : public NfdManagerCommonFixture
 {
 protected:
   ForwarderStatusManagerFixture()
     : manager(m_forwarder, m_dispatcher)
     , startTime(time::system_clock::now())
   {
-    this->setTopPrefixAndPrivilege("/localhost/nfd", "status");
+    setPrivilege("status");
   }
 
 protected:
diff --git a/tests/daemon/mgmt/manager-base.t.cpp b/tests/daemon/mgmt/manager-base.t.cpp
deleted file mode 100644
index ff2f0d4..0000000
--- a/tests/daemon/mgmt/manager-base.t.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015,  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 NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "mgmt/manager-base.hpp"
-#include "manager-common-fixture.hpp"
-
-#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/management/nfd-control-command.hpp>
-
-namespace nfd {
-namespace tests {
-
-class TestCommandVoidParameters : public ndn::nfd::ControlCommand
-{
-public:
-  TestCommandVoidParameters()
-    : ndn::nfd::ControlCommand("test-module", "test-void-parameters")
-  {
-  }
-};
-
-class TestCommandRequireName : public ndn::nfd::ControlCommand
-{
-public:
-  TestCommandRequireName()
-    : ndn::nfd::ControlCommand("test-module", "test-require-name")
-  {
-    m_requestValidator.required(ndn::nfd::CONTROL_PARAMETER_NAME);
-  }
-};
-
-class ManagerBaseFixture : public ManagerCommonFixture
-{
-public:
-  ManagerBaseFixture()
-    : m_manager(m_dispatcher, m_validator, "test-module")
-  {
-  }
-
-protected:
-  ManagerBase m_manager;
-};
-
-BOOST_FIXTURE_TEST_SUITE(MgmtManagerBase, ManagerBaseFixture)
-
-BOOST_AUTO_TEST_CASE(AddSupportedPrivilegeInConstructor)
-{
-  BOOST_CHECK_NO_THROW(m_validator.addSupportedPrivilege("other-module"));
-  // test-module has already been added by the constructor of ManagerBase
-  BOOST_CHECK_THROW(m_validator.addSupportedPrivilege("test-module"), CommandValidator::Error);
-}
-
-BOOST_AUTO_TEST_CASE(RegisterCommandHandler)
-{
-  bool wasCommandHandlerCalled = false;
-  auto handler = bind([&] { wasCommandHandlerCalled = true; });
-
-  m_manager.registerCommandHandler<TestCommandVoidParameters>("test-void", handler);
-  m_manager.registerCommandHandler<TestCommandRequireName>("test-require-name", handler);
-  setTopPrefixAndPrivilege("/localhost/nfd", "test-module");
-
-  auto testRegisterCommandHandler = [&wasCommandHandlerCalled, this] (const Name& commandName) {
-    wasCommandHandlerCalled = false;
-    receiveInterest(makeControlCommandRequest(commandName, ControlParameters()));
-  };
-
-  testRegisterCommandHandler("/localhost/nfd/test-module/test-void");
-  BOOST_CHECK(wasCommandHandlerCalled);
-
-  testRegisterCommandHandler("/localhost/nfd/test-module/test-require-name");
-  BOOST_CHECK(!wasCommandHandlerCalled);
-}
-
-BOOST_AUTO_TEST_CASE(RegisterStatusDataset)
-{
-  bool isStatusDatasetCalled = false;
-  auto handler = bind([&] { isStatusDatasetCalled = true; });
-
-  m_manager.registerStatusDatasetHandler("test-status", handler);
-  m_dispatcher.addTopPrefix("/localhost/nfd");
-  advanceClocks(time::milliseconds(1));
-
-  receiveInterest(makeInterest("/localhost/nfd/test-module/test-status"));
-  BOOST_CHECK(isStatusDatasetCalled);
-}
-
-BOOST_AUTO_TEST_CASE(RegisterNotificationStream)
-{
-  auto post = m_manager.registerNotificationStream("test-notification");
-  m_dispatcher.addTopPrefix("/localhost/nfd");
-  advanceClocks(time::milliseconds(1));
-
-  post(Block("\x82\x01\x02", 3));
-  advanceClocks(time::milliseconds(1));
-
-  BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
-  BOOST_CHECK_EQUAL(m_responses[0].getName(),
-                    Name("/localhost/nfd/test-module/test-notification/%FE%00"));
-}
-
-BOOST_AUTO_TEST_CASE(CommandAuthorization)
-{
-  bool didAcceptCallbackFire = false;
-  bool didRejectCallbackFire = false;
-  auto testAuthorization = [&] {
-    didAcceptCallbackFire = false;
-    didRejectCallbackFire = false;
-
-    auto command = makeControlCommandRequest("/localhost/nfd/test-module/test-verb",
-                                             ControlParameters());
-    ndn::nfd::ControlParameters params;
-    m_manager.authorize("/top/prefix", *command, &params,
-                        bind([&] { didAcceptCallbackFire = true; }),
-                        bind([&] { didRejectCallbackFire = true; }));
-  };
-
-  testAuthorization();
-  BOOST_CHECK(!didAcceptCallbackFire);
-  BOOST_CHECK(didRejectCallbackFire);
-
-  m_validator.addInterestRule("^<localhost><nfd><test-module>", *m_certificate);
-  testAuthorization();
-  BOOST_CHECK(didAcceptCallbackFire);
-  BOOST_CHECK(!didRejectCallbackFire);
-}
-
-BOOST_AUTO_TEST_CASE(ExtractRequester)
-{
-  std::string requesterName;
-  auto testAccept = [&] (const std::string& requester) { requesterName = requester; };
-
-  auto unsignedCommand = makeInterest("/test/interest/unsigned");
-  auto signedCommand = makeControlCommandRequest("/test/interest/signed", ControlParameters());
-
-  m_manager.extractRequester(*unsignedCommand, testAccept);
-  BOOST_CHECK(requesterName.empty());
-
-  requesterName = "";
-  m_manager.extractRequester(*signedCommand, testAccept);
-  auto keyLocator = m_keyChain.getDefaultCertificateNameForIdentity(m_identityName).getPrefix(-1);
-  BOOST_CHECK_EQUAL(requesterName, keyLocator.toUri());
-}
-
-BOOST_AUTO_TEST_CASE(ValidateParameters)
-{
-  ControlParameters params;
-  TestCommandVoidParameters commandVoidParams;
-  TestCommandRequireName commandRequireName;
-
-  BOOST_CHECK_EQUAL(ManagerBase::validateParameters(commandVoidParams, params), true); // succeeds
-  BOOST_CHECK_EQUAL(ManagerBase::validateParameters(commandRequireName, params), false); // fails
-
-  params.setName("test-name");
-  BOOST_CHECK_EQUAL(ManagerBase::validateParameters(commandRequireName, params), true); // succeeds
-}
-
-BOOST_AUTO_TEST_CASE(MakeRelPrefix)
-{
-  auto generatedRelPrefix = m_manager.makeRelPrefix("test-verb");
-  BOOST_CHECK_EQUAL(generatedRelPrefix, PartialName("/test-module/test-verb"));
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-} // namespace tests
-} // namespace nfd
diff --git a/tests/daemon/mgmt/manager-common-fixture.cpp b/tests/daemon/mgmt/manager-common-fixture.cpp
deleted file mode 100644
index 8638d66..0000000
--- a/tests/daemon/mgmt/manager-common-fixture.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- 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 NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "manager-common-fixture.hpp"
-
-namespace nfd {
-namespace tests {
-
-ManagerCommonFixture::ManagerCommonFixture()
-  : m_face(ndn::util::makeDummyClientFace(UnitTestTimeFixture::g_io, {true, true}))
-  , m_dispatcher(*m_face, m_keyChain, ndn::security::SigningInfo())
-  , m_responses(m_face->sentDatas)
-  , m_identityName("/unit-test/ManagerCommonFixture/identity")
-  , m_certificate(m_keyChain.getCertificate(m_keyChain.createIdentity(m_identityName)))
-{
-}
-
-void
-ManagerCommonFixture::setTopPrefixAndPrivilege(const Name& topPrefix,
-                                               const std::string& privilege)
-{
-  m_dispatcher.addTopPrefix(topPrefix); // such that all filters are added
-  advanceClocks(time::milliseconds(1));
-
-  std::string regex("^");
-  for (auto component : topPrefix) {
-    regex += "<" + component.toUri() + ">";
-  }
-  m_validator.addInterestRule(regex + "<" + privilege + ">", *m_certificate);
-}
-
-shared_ptr<Interest>
-ManagerCommonFixture::makeControlCommandRequest(Name commandName,
-                                                const ControlParameters& parameters,
-                                                const InterestHandler& beforeSigning)
-{
-  shared_ptr<Interest> command = makeInterest(commandName.append(parameters.wireEncode()));
-
-  if (beforeSigning != nullptr) {
-    beforeSigning(command);
-  }
-
-  m_keyChain.sign(*command, ndn::security::SigningInfo(ndn::security::SigningInfo::SIGNER_TYPE_ID,
-                                                       m_identityName));
-  return command;
-}
-
-void
-ManagerCommonFixture::receiveInterest(shared_ptr<Interest> interest)
-{
-  m_face->receive<Interest>(*interest);
-  advanceClocks(time::milliseconds(1));
-}
-
-ControlResponse
-ManagerCommonFixture::makeResponse(uint32_t code, const std::string& text,
-                                   const ControlParameters& parameters)
-{
-  return ControlResponse(code, text).setBody(parameters.wireEncode());
-}
-
-ManagerCommonFixture::CheckResponseResult
-ManagerCommonFixture::checkResponse(size_t idx,
-                                    const Name& expectedName,
-                                    const ControlResponse& expectedResponse,
-                                    int expectedContentType /*= -1*/)
-{
-  Data data;
-  try {
-    data = m_responses.at(idx);
-  }
-  catch (const std::out_of_range&) {
-    return CheckResponseResult::OUT_OF_BOUNDARY;
-  }
-
-  if (data.getName() != expectedName) {
-    return CheckResponseResult::WRONG_NAME;
-  }
-
-  if (expectedContentType != -1 &&
-      data.getContentType() != static_cast<uint32_t>(expectedContentType)) {
-    return CheckResponseResult::WRONG_CONTENT_TYPE;
-  }
-
-  ControlResponse response;
-  try {
-    response.wireDecode(data.getContent().blockFromValue());
-  }
-  catch (const tlv::Error&) {
-    return CheckResponseResult::INVALID_RESPONSE;
-  }
-
-  if (response.getCode() != expectedResponse.getCode()) {
-    return CheckResponseResult::WRONG_CODE;
-  }
-
-  if (response.getText() != expectedResponse.getText()) {
-    return CheckResponseResult::WRONG_TEXT;
-  }
-
-  const Block& body = response.getBody();
-  const Block& expectedBody = expectedResponse.getBody();
-  if (body.value_size() != expectedBody.value_size()) {
-    return CheckResponseResult::WRONG_BODY_SIZE;
-  }
-  if (body.value_size() > 0 && memcmp(body.value(), expectedBody.value(), body.value_size()) != 0) {
-    return CheckResponseResult::WRONG_BODY_VALUE;
-  }
-
-  return CheckResponseResult::OK;
-}
-
-Block
-ManagerCommonFixture::concatenateResponses(size_t startIndex, size_t nResponses)
-{
-  auto isFinalSegment = [] (const Data& data) -> bool {
-    const auto& segment = data.getName().at(-1);
-    if (segment.isSegment() == false) {
-      return true;
-    }
-    return segment == data.getFinalBlockId();
-  };
-
-  while (isFinalSegment(m_responses.back()) == false) {
-    auto name = m_responses.back().getName();
-    auto prefix = name.getPrefix(-1);
-    auto segmentNo = name.at(-1).toSegment() + 1;
-    // request for the next segment
-    receiveInterest(makeInterest(prefix.appendSegment(segmentNo)));
-  }
-
-  size_t endIndex = startIndex + nResponses; // not included
-  if (nResponses == startIndex || endIndex > m_responses.size()) {
-    endIndex = m_responses.size();
-  }
-
-  ndn::EncodingBuffer encoder;
-  size_t valueLength = 0;
-  for (size_t i = startIndex; i < endIndex ; i ++) {
-    valueLength += encoder.appendByteArray(m_responses[i].getContent().value(),
-                                           m_responses[i].getContent().value_size());
-  }
-  encoder.prependVarNumber(valueLength);
-  encoder.prependVarNumber(tlv::Content);
-  return encoder.block();
-}
-
-std::ostream&
-operator<<(std::ostream &os, const ManagerCommonFixture::CheckResponseResult& result)
-{
-  switch (result) {
-  case ManagerCommonFixture::CheckResponseResult::OK:
-    os << "OK";
-    break;
-  case ManagerCommonFixture::CheckResponseResult::OUT_OF_BOUNDARY:
-    os << "OUT_OF_BOUNDARY";
-    break;
-  case ManagerCommonFixture::CheckResponseResult::WRONG_NAME:
-    os << "WRONG_NAME";
-    break;
-  case ManagerCommonFixture::CheckResponseResult::WRONG_CONTENT_TYPE:
-    os << "WRONG_CONTENT_TYPE";
-    break;
-  case ManagerCommonFixture::CheckResponseResult::INVALID_RESPONSE:
-    os << "INVALID_RESPONSE";
-    break;
-  case ManagerCommonFixture::CheckResponseResult::WRONG_CODE:
-    os << "WRONG_CODE";
-    break;
-  case ManagerCommonFixture::CheckResponseResult::WRONG_TEXT:
-    os << "WRONG_TEXT";
-    break;
-  case ManagerCommonFixture::CheckResponseResult::WRONG_BODY_SIZE:
-    os << "WRONG_BODY_SIZE";
-    break;
-  case ManagerCommonFixture::CheckResponseResult::WRONG_BODY_VALUE:
-    os << "WRONG_BODY_VALUE";
-    break;
-  default:
-    break;
-  };
-
-  return os;
-}
-
-} // namespace tests
-} // namespace nfd
diff --git a/tests/daemon/mgmt/manager-common-fixture.hpp b/tests/daemon/mgmt/manager-common-fixture.hpp
deleted file mode 100644
index 539d56a..0000000
--- a/tests/daemon/mgmt/manager-common-fixture.hpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015,  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 NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD 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.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NFD_TESTS_NFD_MGMT_MANAGER_COMMON_HPP
-#define NFD_TESTS_NFD_MGMT_MANAGER_COMMON_HPP
-
-#include "tests/test-common.hpp"
-#include "tests/identity-management-fixture.hpp"
-#include "mgmt/manager-base.hpp"
-#include "fw/forwarder.hpp"
-
-#include <ndn-cxx/mgmt/dispatcher.hpp>
-#include <ndn-cxx/util/dummy-client-face.hpp>
-
-namespace nfd {
-namespace tests {
-
-/**
- * @brief a collection of common functions shared by all manager's testing fixtures.
- */
-class ManagerCommonFixture : public UnitTestTimeFixture
-                           , public IdentityManagementFixture
-{
-public: // initialize
-  ManagerCommonFixture();
-
-  /**
-   * @brief set topPrefix to the dispatcher and configure an interest rule for the module.
-   *
-   * after setting @param topPrefix, call advanceClocks to ensure all added filters take effects.
-   *
-   * @param topPrefix top prefix for the dispatcher
-   * @param privilege the module name
-   */
-  void
-  setTopPrefixAndPrivilege(const Name& topPrefix, const std::string& privilege);
-
-public: // test
-  typedef std::function<void(shared_ptr<Interest> interest)> InterestHandler;
-
-  /**
-   * @brief create a ControlCommand request
-   *
-   * step1: append the @param parameters to the @param commandName and make an Interest.
-   * step2: call @param beforeSinging to do something with the Interest.
-   * step3: sign the generated command
-   *
-   * @param commandName the command name
-   * @param parameters the ControlParameters
-   * @param beforeSigning a callback that can modify the Interest before it's signed
-   *
-   * @return the signed ControlCommand request
-   */
-  shared_ptr<Interest>
-  makeControlCommandRequest(Name commandName,
-                            const ControlParameters& parameters,
-                            const InterestHandler& beforeSigning = nullptr);
-
-  /**
-   * @brief cause management to receive an Interest
-   *
-   * call DummyClientFace::receive to receive Interest and then call advanceClocks to ensure
-   * the Interest dispatched
-   *
-   * @param interest the Interest to receive
-   */
-  void
-  receiveInterest(shared_ptr<Interest> interest);
-
-public: // verify
-  ControlResponse
-  makeResponse(uint32_t code, const std::string& text,
-               const ControlParameters& parameters);
-
-  enum class CheckResponseResult
-  {
-    OK,
-    OUT_OF_BOUNDARY,
-    WRONG_NAME,
-    WRONG_CONTENT_TYPE,
-    INVALID_RESPONSE,
-    WRONG_CODE,
-    WRONG_TEXT,
-    WRONG_BODY_SIZE,
-    WRONG_BODY_VALUE
-  };
-
-  /**
-   * @brief check a specified response data with the expected ControlResponse
-   *
-   * @param idx the index of the specified Data in m_responses
-   * @param expectedDataName the expected name of this Data
-   * @param expectedResponse the expected ControlResponse
-   * @param expectedContentType the expected content type of this Data, use -1 to skip this check
-   *
-   * @retval OK the response at the specified index can be decoded from the response data,
-   *            and its code, text and response body are all matched with the expected response
-   * @retval OUT_OF_BOUNDARY the specified index out of boundary
-   * @retval WRONG_NAME the name of the specified response data does not match
-   * @retval WRONG_CONTENT_TYPE the content type of the specified response data does not match
-   * @retval INVALID_RESPONSE the data name matches but it fails in decoding a ControlResponse from
-   *                          the content of the specified response data
-   * @retval WRONG_CODE a valid ControlResponse can be decoded but has a wrong code
-   * @retval WRONG_TEXT a valid ControlResponse can be decoded but has a wrong text
-   * @retval WRONG_BODY_SIZE the body size of decoded ControlResponse does not match
-   * @retval WRONT_BODY_VALUE the body value of decoded ControlResponse does not match
-   */
-  CheckResponseResult
-  checkResponse(size_t idx,
-                const Name& expectedName,
-                const ControlResponse& expectedResponse,
-                int expectedContentType = -1);
-
-  /**
-   * @brief concatenate specified response Data into a single block
-   *
-   * @param startIndex the start index in m_responses
-   * @param nResponses the number of response to concatenate
-   *
-   * @return the generated block
-   */
-  Block
-  concatenateResponses(size_t startIndex = 0, size_t nResponses = 0);
-
-protected:
-  shared_ptr<ndn::util::DummyClientFace> m_face;
-  ndn::mgmt::Dispatcher                  m_dispatcher;
-  CommandValidator                       m_validator;
-  Forwarder                              m_forwarder;
-  std::vector<Data>&                     m_responses; // a reference of m_face->sentDatas
-  Name                                   m_identityName; // the identity used to sign request
-  shared_ptr<ndn::IdentityCertificate>   m_certificate; // the certificate used to sign request
-};
-
-std::ostream&
-operator<<(std::ostream &os, const ManagerCommonFixture::CheckResponseResult& result);
-
-} // namespace tests
-} // namespace nfd
-
-#endif // NFD_TESTS_NFD_MGMT_MANAGER_COMMON_HPP
diff --git a/tests/daemon/mgmt/nfd-manager-base.t.cpp b/tests/daemon/mgmt/nfd-manager-base.t.cpp
new file mode 100644
index 0000000..410f41c
--- /dev/null
+++ b/tests/daemon/mgmt/nfd-manager-base.t.cpp
@@ -0,0 +1,88 @@
+/* -*- 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 NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "mgmt/nfd-manager-base.hpp"
+#include "manager-common-fixture.hpp"
+
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/management/nfd-control-command.hpp>
+
+namespace nfd {
+namespace tests {
+
+class NfdManagerBaseFixture : public ManagerCommonFixture
+{
+public:
+  NfdManagerBaseFixture()
+    : m_manager(m_dispatcher, m_validator, "test-module")
+  {
+  }
+
+protected:
+  CommandValidator m_validator;
+  NfdManagerBase m_manager;
+};
+
+BOOST_AUTO_TEST_SUITE(Mgmt)
+BOOST_FIXTURE_TEST_SUITE(TestNfdManagerBase, NfdManagerBaseFixture)
+
+BOOST_AUTO_TEST_CASE(AddSupportedPrivilegeInConstructor)
+{
+  BOOST_CHECK_NO_THROW(m_validator.addSupportedPrivilege("other-module"));
+  // test-module has already been added by the constructor of ManagerBase
+  BOOST_CHECK_THROW(m_validator.addSupportedPrivilege("test-module"), CommandValidator::Error);
+}
+
+BOOST_AUTO_TEST_CASE(CommandAuthorization)
+{
+  bool didAcceptCallbackFire = false;
+  bool didRejectCallbackFire = false;
+  auto testAuthorization = [&] {
+    didAcceptCallbackFire = false;
+    didRejectCallbackFire = false;
+
+    auto command = makeControlCommandRequest("/localhost/nfd/test-module/test-verb",
+                                             ControlParameters());
+    ndn::nfd::ControlParameters params;
+    m_manager.authorize("/top/prefix", *command, &params,
+                        bind([&] { didAcceptCallbackFire = true; }),
+                        bind([&] { didRejectCallbackFire = true; }));
+  };
+
+  testAuthorization();
+  BOOST_CHECK(!didAcceptCallbackFire);
+  BOOST_CHECK(didRejectCallbackFire);
+
+  m_validator.addInterestRule("^<localhost><nfd><test-module>", *m_certificate);
+  testAuthorization();
+  BOOST_CHECK(didAcceptCallbackFire);
+  BOOST_CHECK(!didRejectCallbackFire);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // TestNfdManagerBase
+BOOST_AUTO_TEST_SUITE_END() // Mgmt
+
+} // namespace tests
+} // namespace nfd
diff --git a/tests/daemon/mgmt/nfd-manager-common-fixture.hpp b/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
new file mode 100644
index 0000000..ba06839
--- /dev/null
+++ b/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
@@ -0,0 +1,76 @@
+/* -*- 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 NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_HPP
+#define NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_HPP
+
+#include "manager-common-fixture.hpp"
+#include "fw/forwarder.hpp"
+#include "mgmt/command-validator.hpp"
+
+namespace nfd {
+namespace tests {
+
+/**
+ * @brief a base class shared by all NFD manager's testing fixtures.
+ */
+class NfdManagerCommonFixture : public ManagerCommonFixture
+{
+public:
+  NfdManagerCommonFixture()
+    : m_topPrefix("/localhost/nfd")
+  {
+  }
+
+  /**
+   * @brief configure an interest rule for the module.
+   *
+   * set top prefix before set privilege.
+   *
+   * @param privilege the module name
+   */
+  void
+  setPrivilege(const std::string& privilege)
+  {
+    setTopPrefix(m_topPrefix);
+
+    std::string regex("^");
+    for (auto component : m_topPrefix) {
+      regex += "<" + component.toUri() + ">";
+    }
+
+    m_validator.addInterestRule(regex + "<" + privilege + ">", *m_certificate);
+  }
+
+protected:
+  Forwarder m_forwarder;
+  CommandValidator m_validator;
+  Name m_topPrefix;
+};
+
+} // namespace tests
+} // namespace nfd
+
+#endif // NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_HPP
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 9e7a8c2..90789a0 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.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,7 +24,7 @@
  */
 
 #include "mgmt/strategy-choice-manager.hpp"
-#include "manager-common-fixture.hpp"
+#include "nfd-manager-common-fixture.hpp"
 
 #include "face/face.hpp"
 #include "face/internal-face.hpp"
@@ -40,14 +40,14 @@
 namespace nfd {
 namespace tests {
 
-class StrategyChoiceManagerFixture : public ManagerCommonFixture
+class StrategyChoiceManagerFixture : public NfdManagerCommonFixture
 {
 public:
   StrategyChoiceManagerFixture()
     : m_strategyChoice(m_forwarder.getStrategyChoice())
     , m_manager(m_strategyChoice, m_dispatcher, m_validator)
   {
-    setTopPrefixAndPrivilege("/localhost/nfd", "strategy-choice");
+    setPrivilege("strategy-choice");
   }
 
 public:
