diff --git a/tests/unit/clients/response.t.cpp b/tests/unit/clients/response.t.cpp
index 97a6fe0..a24505e 100644
--- a/tests/unit/clients/response.t.cpp
+++ b/tests/unit/clients/response.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020, 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.
@@ -33,7 +33,6 @@
   Name zone("/net");
   name::Component qType = ndns::label::NDNS_ITERATIVE_QUERY;
 
-
   ndns::Response r(zone, qType);
   r.setRrLabel(Name("/ndnsim/www"));
   r.setRrType(label::CERT_RR_TYPE);
@@ -47,7 +46,7 @@
   BOOST_CHECK_EQUAL(r.getQueryType(), qType);
 
   const std::string DATA1("some fake content");
-  r.setAppContent(makeBinaryBlock(ndn::tlv::Content, DATA1.c_str(), DATA1.size()));
+  r.setAppContent(makeStringBlock(ndn::tlv::Content, DATA1));
 
   //const Block& block = r.wireEncode();
   shared_ptr<Data> data = r.toData();
@@ -63,10 +62,9 @@
   r4.setContentType(NDNS_RESP);
 
   std::string str = "Just try it";
-  Block s = makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size());
+  Block s = makeStringBlock(ndns::tlv::RrData, str);
   r4.addRr(s);
   str = "Go to Hell";
-  // Block s2 = makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size());
   r4.addRr(str);
 
   BOOST_CHECK_NE(r2, r4);
@@ -78,7 +76,7 @@
 
   BOOST_CHECK_EQUAL(r5.fromData(zone, *data), true);
   BOOST_CHECK_EQUAL(r4, r5);
- }
+}
 
 BOOST_AUTO_TEST_SUITE_END()
 
diff --git a/tests/unit/daemon/db-mgr.t.cpp b/tests/unit/daemon/db-mgr.t.cpp
index 0b69330..a30f2dc 100644
--- a/tests/unit/daemon/db-mgr.t.cpp
+++ b/tests/unit/daemon/db-mgr.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020, 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.
@@ -18,7 +18,6 @@
  */
 
 #include "daemon/db-mgr.hpp"
-#include "logger.hpp"
 
 #include "boost-test.hpp"
 
@@ -29,8 +28,6 @@
 namespace ndns {
 namespace tests {
 
-NDNS_LOG_INIT(DbMgrTest);
-
 BOOST_AUTO_TEST_SUITE(DbMgr)
 
 const auto TEST_DATABASE2 = boost::filesystem::path(UNIT_TESTS_TMPDIR) / "test-ndns.db";
@@ -46,7 +43,6 @@
   ~DbMgrFixture()
   {
     session.close();
-    NDNS_LOG_INFO("remove database " << TEST_DATABASE2);
     boost::filesystem::remove(TEST_DATABASE2);
   }
 
@@ -113,7 +109,7 @@
   rrset1.setTtl(time::seconds(4600));
 
   static const std::string DATA1 = "SOME DATA";
-  rrset1.setData(makeBinaryBlock(ndn::tlv::Content, DATA1.c_str(), DATA1.size()));
+  rrset1.setData(makeStringBlock(ndn::tlv::Content, DATA1));
 
   BOOST_CHECK_EQUAL(rrset1.getId(), 0);
   BOOST_CHECK_NO_THROW(session.insert(rrset1));
@@ -141,7 +137,7 @@
 
   rrset1.setVersion(name::Component::fromVersion(890));
   static const std::string DATA2 = "ANOTHER DATA";
-  rrset1.setData(makeBinaryBlock(ndn::tlv::Content, DATA2.c_str(), DATA2.size()));
+  rrset1.setData(makeStringBlock(ndn::tlv::Content, DATA2));
 
   BOOST_CHECK_NO_THROW(session.update(rrset1));
 
@@ -190,7 +186,7 @@
   rrset1.setId(1);
   BOOST_CHECK_NO_THROW(session.remove(rrset1));
 
-  rrset1.setZone(0);
+  rrset1.setZone(nullptr);
   rrset1.setId(1);
   BOOST_CHECK_NO_THROW(session.remove(rrset1));
 }
@@ -233,7 +229,7 @@
   rrset1.setTtl(time::seconds(4600));
 
   static const std::string DATA1 = "SOME DATA";
-  rrset1.setData(makeBinaryBlock(ndn::tlv::Content, DATA1.data(), DATA1.size()));
+  rrset1.setData(makeStringBlock(ndn::tlv::Content, DATA1));
   session.insert(rrset1);
 
   Rrset rrset2(&zone);
@@ -242,14 +238,13 @@
   rrset2.setVersion(name::Component::fromVersion(232));
   rrset2.setTtl(time::seconds(2100));
   std::string data2 = "host1.net";
-  rrset2.setData(makeBinaryBlock(ndn::tlv::Content, data2.c_str(), data2.size()));
+  rrset2.setData(makeStringBlock(ndn::tlv::Content, data2));
   session.insert(rrset2);
 
   std::vector<Rrset> vec = session.findRrsets(zone);
   BOOST_CHECK_EQUAL(vec.size(), 2);
 
-  std::sort(vec.begin(),
-            vec.end(),
+  std::sort(vec.begin(), vec.end(),
             [] (const Rrset& n1, const Rrset& n2) {
               return n1.getLabel().size() < n2.getLabel().size();
             });
diff --git a/tests/unit/daemon/name-server.t.cpp b/tests/unit/daemon/name-server.t.cpp
index a0ec0f5..35555dd 100644
--- a/tests/unit/daemon/name-server.t.cpp
+++ b/tests/unit/daemon/name-server.t.cpp
@@ -22,7 +22,6 @@
 #include "clients/query.hpp"
 #include "clients/response.hpp"
 #include "daemon/db-mgr.hpp"
-#include "logger.hpp"
 
 #include "boost-test.hpp"
 #include "unit/database-test-data.hpp"
@@ -34,8 +33,6 @@
 namespace ndns {
 namespace tests {
 
-NDNS_LOG_INIT(NameServerTest);
-
 class NameServerFixture : public DbTestData
 {
 public:
@@ -76,7 +73,6 @@
 
   face.onSendData.connectSingleShot([&] (const Data& data) {
     hasDataBack = true;
-    NDNS_LOG_TRACE("get Data back");
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
 
     Response resp;
@@ -101,7 +97,6 @@
   // will ask for non-existing record
   face.onSendData.connectSingleShot([&] (const Data& data) {
     ++nDataBack;
-    NDNS_LOG_TRACE("get Data back");
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
 
     Response resp;
@@ -115,7 +110,6 @@
   // will ask for the existing record (will have type NDNS_KEY, as it is certificate)
   face.onSendData.connectSingleShot([&] (const Data& data) {
     ++nDataBack;
-    NDNS_LOG_TRACE("get Data back");
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
 
     Response resp;
@@ -173,9 +167,9 @@
   re.setContentType(NDNS_RESP);
 
   std::string str = "ns1.ndnsim.net";
-  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeStringBlock(ndns::tlv::RrData, str));
   str = "ns2.ndnsim.net";
-  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeStringBlock(ndns::tlv::RrData, str));
 
   auto data = re.toData();
   m_keyChain.sign(*data, security::signingByCertificate(m_cert));
@@ -191,18 +185,17 @@
 
   face.onSendData.connectSingleShot([&] (const Data& data) {
     hasDataBack = true;
-    NDNS_LOG_TRACE("get Data back");
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
     Response resp;
 
     BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
     BOOST_CHECK_EQUAL(resp.getContentType(), NDNS_RESP); // by default NDNS_BLOB is enough
-    BOOST_CHECK_GT(resp.getRrs().size(), 0);
+    BOOST_TEST_REQUIRE(resp.getRrs().size() > 0);
     Block block = resp.getRrs()[0];
     block.parse();
     int ret = -1;
     BOOST_CHECK_EQUAL(block.type(), ndns::tlv::RrData);
-    Block::element_const_iterator val = block.elements_begin();
+    auto val = block.elements_begin();
     BOOST_CHECK_EQUAL(val->type(), ndns::tlv::UpdateReturnCode); // the first must be return code
     ret = readNonNegativeInteger(*val);
     BOOST_CHECK_EQUAL(ret, 0);
@@ -223,9 +216,9 @@
   re.setContentType(NDNS_RESP);
 
   std::string str = "ns1.ndnsim.net";
-  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeStringBlock(ndns::tlv::RrData, str));
   str = "ns2.ndnsim.net";
-  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeStringBlock(ndns::tlv::RrData, str));
 
   auto data = re.toData();
   m_keyChain.sign(*data, security::signingByCertificate(m_cert));
@@ -241,18 +234,17 @@
 
   face.onSendData.connectSingleShot([&] (const Data& data) {
     hasDataBack = true;
-    NDNS_LOG_TRACE("get Data back");
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
     Response resp;
 
     BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
     BOOST_CHECK_EQUAL(resp.getContentType(), NDNS_RESP); // by default NDNS_BLOB is enough
-    BOOST_CHECK_GT(resp.getRrs().size(), 0);
+    BOOST_TEST_REQUIRE(resp.getRrs().size() > 0);
     Block block = resp.getRrs()[0];
     block.parse();
     int ret = -1;
     BOOST_CHECK_EQUAL(block.type(), ndns::tlv::RrData);
-    Block::element_const_iterator val = block.elements_begin();
+    auto val = block.elements_begin();
     BOOST_CHECK_EQUAL(val->type(), ndns::tlv::UpdateReturnCode); // the first must be return code
     ret = readNonNegativeInteger(*val);
     BOOST_CHECK_EQUAL(ret, 0);
@@ -284,9 +276,8 @@
 
   m_keyChain.sign(dskCert, security::signingByCertificate(m_cert));
   m_keyChain.setDefaultCertificate(dsk, dskCert);
-
-  NDNS_LOG_TRACE("KeyChain: add cert: " << dskCert.getName() << ". KeyLocator: "
-                 << dskCert.getKeyLocator()->getName());
+  BOOST_TEST_MESSAGE("Added Certificate=" << dskCert.getName()
+                     << " KeyLocator=" << dskCert.getKeyLocator()->getName());
 
   Rrset rrset(&m_test);
   Name label = dskCert.getName().getPrefix(-2).getSubName(m_test.getName().size() + 1);
@@ -296,8 +287,7 @@
   rrset.setTtl(m_test.getTtl());
   rrset.setData(dskCert.wireEncode());
   m_session.insert(rrset);
-  NDNS_LOG_TRACE("DB: zone " << m_test << " add a CERT RR with name="
-                 << dskCert.getName() << " rrLabel=" << label);
+  BOOST_TEST_MESSAGE(m_test << " added CERT RR with name=" << dskCert.getName() << " label=" << label);
 
   Response re;
   re.setZone(zone);
@@ -307,9 +297,9 @@
   re.setContentType(NDNS_RESP);
 
   std::string str = "ns1.ndnsim.net";
-  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeStringBlock(ndns::tlv::RrData, str));
   str = "ns2.ndnsim.net";
-  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeStringBlock(ndns::tlv::RrData, str));
 
   auto data = re.toData();
   m_keyChain.sign(*data, security::signingByCertificate(dskCert));
@@ -326,7 +316,7 @@
   // no data back, since the Update cannot pass verification
   face.onSendData.connectSingleShot([&] (const Data&) {
     hasDataBack = true;
-    BOOST_FAIL("UNEXPECTED");
+    BOOST_ERROR("unexpected onSendData");
   });
 
   face.receive(q.toInterest());
@@ -349,9 +339,8 @@
     run();
 
     validatorFace.onSendInterest.connect([this] (const Interest& interest) {
-      NDNS_LOG_TRACE("validatorFace get Interest: " << interest.getName());
-      auto i = interest.shared_from_this();
-      io.post([i, this] { face.receive(*i); });
+      BOOST_TEST_MESSAGE("Interest on validatorFace: " << interest);
+      io.post([this, i = interest.shared_from_this()] { face.receive(*i); });
     });
   }
 
@@ -381,9 +370,9 @@
   re.setContentType(NDNS_RESP);
 
   std::string str = "ns1.ndnsim.net";
-  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeStringBlock(ndns::tlv::RrData, str));
   str = "ns2.ndnsim.net";
-  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeStringBlock(ndns::tlv::RrData, str));
 
   auto data = re.toData();
   m_keyChain.sign(*data, security::signingByCertificate(m_cert));
@@ -396,25 +385,23 @@
   q.setRrType(label::NDNS_UPDATE_LABEL);
 
   bool hasDataBack = false;
+  auto regex = make_shared<Regex>("(<>*)<NDNS><KEY>(<>+)<CERT><>");
 
-  shared_ptr<Regex> regex = make_shared<Regex>("(<>*)<NDNS><KEY>(<>+)<CERT><>");
   face.onSendData.connect([&] (const Data& data) {
     if (regex->match(data.getName())) {
-      shared_ptr<const Data> d = data.shared_from_this();
-      io.post([d, this] {
-          validatorFace.receive(*d); // It's data requested by validator
-        });
+      io.post([this, d = data.shared_from_this()] {
+        validatorFace.receive(*d); // It's data requested by validator
+      });
     }
     else {
       // cert is requested by validator
       hasDataBack = true;
-      NDNS_LOG_TRACE("get Data back");
       BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
       Response resp;
 
       BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
       BOOST_CHECK_EQUAL(resp.getContentType(), NDNS_RESP); // by default NDNS_BLOB is enough
-      BOOST_CHECK_GT(resp.getRrs().size(), 0);
+      BOOST_TEST_REQUIRE(resp.getRrs().size() > 0);
       Block block = resp.getRrs()[0];
       block.parse();
       int ret = -1;
diff --git a/tests/unit/daemon/rrset-factory.t.cpp b/tests/unit/daemon/rrset-factory.t.cpp
index 5314dad..66c65dd 100644
--- a/tests/unit/daemon/rrset-factory.t.cpp
+++ b/tests/unit/daemon/rrset-factory.t.cpp
@@ -31,8 +31,6 @@
 namespace ndns {
 namespace tests {
 
-NDNS_LOG_INIT(RrsetFactoryTest);
-
 const auto TEST_DATABASE2 = boost::filesystem::path(UNIT_TESTS_TMPDIR) / "test-ndns.db";
 const auto TEST_CERT = boost::filesystem::path(UNIT_TESTS_TMPDIR) / "anchors" / "root.cert";
 
@@ -47,24 +45,18 @@
     Zone zone1;
     zone1.setName(m_zoneName);
     zone1.setTtl(time::seconds(4600));
-    BOOST_CHECK_NO_THROW(m_session.insert(zone1));
+    m_session.insert(zone1);
 
     Name identityName = Name(TEST_IDENTITY_NAME).append("NDNS");
-
     m_identity = m_keyChain.createIdentity(identityName);
     m_cert = m_identity.getDefaultKey().getDefaultCertificate();
     m_certName = m_cert.getName();
     saveIdentityCert(m_identity, TEST_CERT.string());
-
-    NDNS_LOG_INFO("save test root cert " << m_certName << " to: " << TEST_CERT);
-    BOOST_CHECK_GT(m_certName.size(), 0);
-    NDNS_LOG_TRACE("test certName: " << m_certName);
   }
 
   ~RrsetFactoryFixture()
   {
     m_session.close();
-    NDNS_LOG_INFO("remove database " << TEST_DATABASE2);
     boost::filesystem::remove(TEST_DATABASE2);
     boost::filesystem::remove(TEST_CERT);
   }
diff --git a/tests/unit/database-test-data.cpp b/tests/unit/database-test-data.cpp
index 9188eff..f77c5be 100644
--- a/tests/unit/database-test-data.cpp
+++ b/tests/unit/database-test-data.cpp
@@ -30,8 +30,6 @@
 namespace ndns {
 namespace tests {
 
-NDNS_LOG_INIT(TestFakeData);
-
 const fs::path DbTestData::TEST_DATABASE = fs::path(UNIT_TESTS_TMPDIR) / "test-ndns.db";
 const Name DbTestData::TEST_IDENTITY_NAME("/test19");
 const fs::path DbTestData::TEST_CERT = fs::path(UNIT_TESTS_TMPDIR) / "anchors" / "root.cert";
@@ -44,13 +42,11 @@
 }
 
 DbTestData::DbTestData()
-  : m_session(TEST_DATABASE.string()),
-    m_testName("/test19"),
-    m_netName("/test19/net"),
-    m_ndnsimName("/test19/net/ndnsim")
+  : m_session(TEST_DATABASE.string())
+  , m_testName("/test19")
+  , m_netName("/test19/net")
+  , m_ndnsimName("/test19/net/ndnsim")
 {
-  NDNS_LOG_TRACE("start creating test data");
-
   NdnsValidatorBuilder::VALIDATOR_CONF_FILE = (fs::path(UNIT_TESTS_TMPDIR) / "validator.conf").string();
 
   ManagementTool tool(TEST_DATABASE.string(), m_keyChain);
@@ -81,18 +77,15 @@
   m_identity = CertHelper::getIdentity(m_keyChain, identityName);
   m_certName = CertHelper::getDefaultCertificateNameOfIdentity(m_keyChain, identityName);
   m_cert = CertHelper::getCertificate(m_keyChain, identityName, m_certName);
+  BOOST_ASSERT(!m_certName.empty());
 
   io::save(m_cert, TEST_CERT.string());
-  NDNS_LOG_INFO("save test root cert " << m_certName << " to: " << TEST_CERT.string());
-
-  BOOST_ASSERT(!m_certName.empty());
-  NDNS_LOG_TRACE("test certName: " << m_certName);
 
   int certificateIndex = 0;
   auto addQueryRrset = [this, &certificateIndex] (const Name& label, Zone& zone,
                                                   const name::Component& type) {
     const time::seconds ttl(3000 + 100 * certificateIndex);
-    const name::Component version = name::Component::fromVersion(100 + 1000 * certificateIndex);
+    const auto version = name::Component::fromVersion(100 + 1000 * certificateIndex);
     name::Component qType(label::NDNS_ITERATIVE_QUERY);
     NdnsContentType contentType = NDNS_RESP;
     if (type == label::APPCERT_RR_TYPE) {
@@ -122,8 +115,6 @@
   // last link is the same as former one
   BOOST_ASSERT(!m_links.empty());
   m_links.push_back(m_links.back());
-
-  NDNS_LOG_INFO("insert testing data: OK");
 }
 
 void
diff --git a/tests/unit/mgmt/management-tool.t.cpp b/tests/unit/mgmt/management-tool.t.cpp
index 97282d1..d4f6234 100644
--- a/tests/unit/mgmt/management-tool.t.cpp
+++ b/tests/unit/mgmt/management-tool.t.cpp
@@ -447,8 +447,7 @@
 
   // Check certificate freshnessPeriod and validity
   Certificate cert = CertHelper::getCertificate(m_keyChain, zoneIdentityName, dsk);
-  time::system_clock::TimePoint beg,end;
-  std::tie(beg, end) = cert.getValidityPeriod().getPeriod();
+  auto [beg, end] = cert.getValidityPeriod().getPeriod();
 
   BOOST_REQUIRE_NO_THROW(cert = findCertFromDb(zone, dsk));
   BOOST_CHECK_EQUAL(cert.getFreshnessPeriod(), time::seconds(4200));
