diff --git a/tests/unit/daemon/name-server.t.cpp b/tests/unit/daemon/name-server.t.cpp
index 6378f43..8ca796d 100644
--- a/tests/unit/daemon/name-server.t.cpp
+++ b/tests/unit/daemon/name-server.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021, Regents of the University of California.
+ * Copyright (c) 2014-2022, 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.
@@ -133,7 +133,7 @@
   BOOST_CHECK_EQUAL(nDataBack, 2);
 
   // explicit interest with correct version
-  face.receive(Interest(m_cert.getName()).setCanBePrefix(false));
+  face.receive(Interest(m_cert.getName()));
 
   face.onSendData.connectSingleShot([&] (const Data& data) {
     ++nDataBack;
@@ -149,7 +149,7 @@
   // explicit interest with wrong version
   Name wrongName = m_cert.getName().getPrefix(-1);
   wrongName.appendVersion();
-  face.receive(Interest(wrongName).setCanBePrefix(false));
+  face.receive(Interest(wrongName));
 
   face.onSendData.connectSingleShot([&] (const Data& data) {
     ++nDataBack;
diff --git a/tests/unit/database-test-data.cpp b/tests/unit/database-test-data.cpp
index 3ec18ae..9188eff 100644
--- a/tests/unit/database-test-data.cpp
+++ b/tests/unit/database-test-data.cpp
@@ -85,7 +85,7 @@
   io::save(m_cert, TEST_CERT.string());
   NDNS_LOG_INFO("save test root cert " << m_certName << " to: " << TEST_CERT.string());
 
-  BOOST_ASSERT(m_certName.size() > 0);
+  BOOST_ASSERT(!m_certName.empty());
   NDNS_LOG_TRACE("test certName: " << m_certName);
 
   int certificateIndex = 0;
@@ -139,20 +139,18 @@
     rrset = rf.generateNsRrset(label, version.toVersion(), ttl, {"/xx"});
     if (contentType != NDNS_AUTH) {
       // do not add AUTH packet to link
-      m_links.push_back(Link(rrset.getData()));
+      m_links.emplace_back(rrset.getData());
     }
   }
   else if (type == label::TXT_RR_TYPE) {
-    rrset = rf.generateTxtRrset(label, version.toVersion(), ttl,
-                                std::vector<std::string>());
+    rrset = rf.generateTxtRrset(label, version.toVersion(), ttl, {});
   }
   else if (type == label::APPCERT_RR_TYPE) {
-    rrset = rf.generateCertRrset(label, version.toVersion(), ttl,
-                                 m_cert);
+    rrset = rf.generateCertRrset(label, version.toVersion(), ttl, m_cert);
   }
 
-  auto data = make_shared<Data>(rrset.getData());
-  security::verifySignature(*data, m_cert);
+  auto data = std::make_shared<Data>(rrset.getData());
+  BOOST_VERIFY(security::verifySignature(*data, m_cert));
 
   ManagementTool tool(TEST_DATABASE.string(), m_keyChain);
   tool.addRrset(rrset);
