diff --git a/tests/daemon/mgmt/command-authenticator.t.cpp b/tests/daemon/mgmt/command-authenticator.t.cpp
index 051d7c9..3c2d59d 100644
--- a/tests/daemon/mgmt/command-authenticator.t.cpp
+++ b/tests/daemon/mgmt/command-authenticator.t.cpp
@@ -27,22 +27,15 @@
 
 #include "manager-common-fixture.hpp"
 
-#include <boost/filesystem.hpp>
-
 namespace nfd::tests {
 
-class CommandAuthenticatorFixture : public CommandInterestSignerFixture
+class CommandAuthenticatorFixture : public InterestSignerFixture
 {
 protected:
-  CommandAuthenticatorFixture()
-    : authenticator(CommandAuthenticator::create())
-  {
-  }
-
   void
   makeModules(std::initializer_list<std::string> modules)
   {
-    for (const std::string& module : modules) {
+    for (const auto& module : modules) {
       authorizations.emplace(module, authenticator->makeAuthorization(module, "verb"));
     }
   }
@@ -50,10 +43,9 @@
   void
   loadConfig(const std::string& config)
   {
-    auto configPath = boost::filesystem::current_path() / "command-authenticator-test.conf";
     ConfigFile cf;
     authenticator->setConfigFile(cf);
-    cf.parse(config, false, configPath.c_str());
+    cf.parse(config, false, "command-authenticator-test.conf");
   }
 
   bool
@@ -66,7 +58,7 @@
       modifyInterest(interest);
     }
 
-    ndn::mgmt::Authorization authorization = authorizations.at(module);
+    const auto& authorization = authorizations.at(module);
 
     bool isAccepted = false;
     bool isRejected = false;
@@ -91,7 +83,7 @@
   }
 
 protected:
-  shared_ptr<CommandAuthenticator> authenticator;
+  shared_ptr<CommandAuthenticator> authenticator = CommandAuthenticator::create();
   std::unordered_map<std::string, ndn::mgmt::Authorization> authorizations;
   std::string lastRequester;
   ndn::mgmt::RejectReply lastRejectReply;
@@ -110,7 +102,7 @@
   BOOST_REQUIRE(saveIdentityCert(id2, "2.ndncert", true));
 
   makeModules({"module0", "module1", "module2", "module3", "module4", "module5", "module6", "module7"});
-  const std::string& config = R"CONFIG(
+  const std::string config = R"CONFIG(
     authorizations
     {
       authorize
@@ -199,7 +191,7 @@
   BOOST_REQUIRE(saveIdentityCert(id1, "1.ndncert", true));
 
   makeModules({"module0", "module1"});
-  const std::string& config = R"CONFIG(
+  const std::string config = R"CONFIG(
     authorizations
     {
       authorize
@@ -238,12 +230,11 @@
 {
 protected:
   IdentityAuthorizedFixture()
-    : id1("/localhost/CommandAuthenticator/1")
   {
     BOOST_REQUIRE(saveIdentityCert(id1, "1.ndncert", true));
 
     makeModules({"module1"});
-    const std::string& config = R"CONFIG(
+    const std::string config = R"CONFIG(
       authorizations
       {
         authorize
@@ -266,10 +257,10 @@
   }
 
 protected:
-  Name id1;
+  const Name id1{"/localhost/CommandAuthenticator/1"};
 };
 
-BOOST_FIXTURE_TEST_SUITE(Rejects, IdentityAuthorizedFixture)
+BOOST_FIXTURE_TEST_SUITE(Reject, IdentityAuthorizedFixture)
 
 BOOST_AUTO_TEST_CASE(BadKeyLocator_NameTooShort)
 {
@@ -281,7 +272,7 @@
   BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::SILENT);
 }
 
-BOOST_AUTO_TEST_CASE(BadKeyLocator_BadSigInfo)
+BOOST_AUTO_TEST_CASE(BadSigInfo)
 {
   BOOST_CHECK_EQUAL(authorize1(
     [] (Interest& interest) {
@@ -291,7 +282,7 @@
   BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::SILENT);
 }
 
-BOOST_AUTO_TEST_CASE(BadKeyLocator_MissingKeyLocator)
+BOOST_AUTO_TEST_CASE(MissingKeyLocator)
 {
   BOOST_CHECK_EQUAL(authorize1(
     [] (Interest& interest) {
@@ -302,7 +293,7 @@
   BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::SILENT);
 }
 
-BOOST_AUTO_TEST_CASE(BadKeyLocator_BadKeyLocatorType)
+BOOST_AUTO_TEST_CASE(BadKeyLocatorType)
 {
   BOOST_CHECK_EQUAL(authorize1(
     [] (Interest& interest) {
@@ -364,13 +355,13 @@
   BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::STATUS403);
 }
 
-BOOST_AUTO_TEST_SUITE_END() // Rejects
+BOOST_AUTO_TEST_SUITE_END() // Reject
 
 BOOST_AUTO_TEST_SUITE(BadConfig)
 
 BOOST_AUTO_TEST_CASE(EmptyAuthorizationsSection)
 {
-  const std::string& config = R"CONFIG(
+  const std::string config = R"CONFIG(
     authorizations
     {
     }
@@ -381,7 +372,7 @@
 
 BOOST_AUTO_TEST_CASE(UnrecognizedKey)
 {
-  const std::string& config = R"CONFIG(
+  const std::string config = R"CONFIG(
     authorizations
     {
       unrecognized_key
@@ -395,7 +386,7 @@
 
 BOOST_AUTO_TEST_CASE(CertfileMissing)
 {
-  const std::string& config = R"CONFIG(
+  const std::string config = R"CONFIG(
     authorizations
     {
       authorize
@@ -412,7 +403,7 @@
 
 BOOST_AUTO_TEST_CASE(CertUnreadable)
 {
-  const std::string& config = R"CONFIG(
+  const std::string config = R"CONFIG(
     authorizations
     {
       authorize
@@ -430,7 +421,7 @@
 
 BOOST_AUTO_TEST_CASE(PrivilegesMissing)
 {
-  const std::string& config = R"CONFIG(
+  const std::string config = R"CONFIG(
     authorizations
     {
       authorize
@@ -445,7 +436,7 @@
 
 BOOST_AUTO_TEST_CASE(UnregisteredModule)
 {
-  const std::string& config = R"CONFIG(
+  const std::string config = R"CONFIG(
     authorizations
     {
       authorize
