diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
index 4e6f731..b13c44a 100644
--- a/tests/identity-management-fixture.cpp
+++ b/tests/identity-management-fixture.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,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -128,7 +128,7 @@
   certificate.setFreshnessPeriod(time::hours(1));
 
   // set content
-  certificate.setContent(key.getPublicKey().data(), key.getPublicKey().size());
+  certificate.setContent(key.getPublicKey());
 
   // set signature-info
   ndn::SignatureInfo info;
diff --git a/tests/route/test-nexthop.cpp b/tests/route/test-nexthop.cpp
index a11c221..3ba3539 100644
--- a/tests/route/test-nexthop.cpp
+++ b/tests/route/test-nexthop.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2022,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -26,13 +26,13 @@
 
 BOOST_AUTO_TEST_SUITE(TestNexthop)
 
-double
+static double
 getHyperbolicAdjustedDecimal(unsigned int i)
 {
   return static_cast<double>(i)/(10*NextHop::HYPERBOLIC_COST_ADJUSTMENT_FACTOR);
 }
 
-uint64_t
+static uint64_t
 applyHyperbolicFactorAndRound(double d)
 {
   return round(NextHop::HYPERBOLIC_COST_ADJUSTMENT_FACTOR*d);
@@ -117,17 +117,13 @@
   nexthops1.setConnectingFaceUri("/test/nexthop/tlv");
   nexthops1.setRouteCost(1.65);
 
-  const ndn::Block& wire = nexthops1.wireEncode();
-  BOOST_REQUIRE_EQUAL_COLLECTIONS(NexthopData,
-                                  NexthopData + sizeof(NexthopData),
-                                  wire.begin(), wire.end());
+  BOOST_TEST(nexthops1.wireEncode() == NexthopData, boost::test_tools::per_element());
 }
 
 BOOST_AUTO_TEST_CASE(NexthopDecode)
 {
   NextHop nexthops1;
-
-  nexthops1.wireDecode(ndn::Block(NexthopData, sizeof(NexthopData)));
+  nexthops1.wireDecode(ndn::Block{NexthopData});
 
   BOOST_REQUIRE_EQUAL(nexthops1.getConnectingFaceUri(), "/test/nexthop/tlv");
   BOOST_REQUIRE_EQUAL(nexthops1.getRouteCost(), 1.65);
diff --git a/tests/route/test-routing-table-entry.cpp b/tests/route/test-routing-table-entry.cpp
index c17b981..ef470e1 100644
--- a/tests/route/test-routing-table-entry.cpp
+++ b/tests/route/test-routing-table-entry.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2022,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -69,18 +69,13 @@
   nexthops2.setRouteCost(1.65);
   rte.getNexthopList().addNextHop(nexthops2);
 
-  const ndn::Block& wire = rte.wireEncode();
-
-  BOOST_REQUIRE_EQUAL_COLLECTIONS(RoutingTableEntryWithNexthopsData,
-                                  RoutingTableEntryWithNexthopsData +
-                                    sizeof(RoutingTableEntryWithNexthopsData),
-                                  wire.begin(), wire.end());
+  BOOST_TEST(rte.wireEncode() == RoutingTableEntryWithNexthopsData,
+             boost::test_tools::per_element());
 }
 
 BOOST_AUTO_TEST_CASE(RoutingTableEntryDecodeWithNexthops)
 {
-  RoutingTableEntry rte(ndn::Block(RoutingTableEntryWithNexthopsData,
-                                   sizeof(RoutingTableEntryWithNexthopsData)));
+  RoutingTableEntry rte(ndn::Block{RoutingTableEntryWithNexthopsData});
   BOOST_CHECK_EQUAL(rte.getDestination(), "dest1");
 
   BOOST_CHECK(rte.getNexthopList().size() != 0);
@@ -96,25 +91,17 @@
 BOOST_AUTO_TEST_CASE(RoutingTableEntryEncodeWithoutNexthops)
 {
   RoutingTableEntry rte(ndn::Name("dest1"));
-
-  auto wire = rte.wireEncode();
-
-  BOOST_REQUIRE_EQUAL_COLLECTIONS(RoutingTableEntryWithoutNexthopsData,
-                                  RoutingTableEntryWithoutNexthopsData +
-                                    sizeof(RoutingTableEntryWithoutNexthopsData),
-                                  wire.begin(), wire.end());
+  BOOST_TEST(rte.wireEncode() == RoutingTableEntryWithoutNexthopsData,
+             boost::test_tools::per_element());
 }
 
 BOOST_AUTO_TEST_CASE(RoutingTableEntryDecodeWithoutNexthops)
 {
-  RoutingTableEntry rte(ndn::Block(RoutingTableEntryWithoutNexthopsData,
-                                   sizeof(RoutingTableEntryWithoutNexthopsData)));
-
+  RoutingTableEntry rte(ndn::Block{RoutingTableEntryWithoutNexthopsData});
   BOOST_CHECK_EQUAL(rte.getDestination(), "dest1");
-  BOOST_CHECK(rte.getNexthopList().size() == 0);
+  BOOST_CHECK_EQUAL(rte.getNexthopList().size(), 0);
 }
 
-
 BOOST_AUTO_TEST_CASE(RoutingTableEntryClear)
 {
   RoutingTableEntry rte(ndn::Name("dest1"));
diff --git a/tests/route/test-routing-table.cpp b/tests/route/test-routing-table.cpp
index 6a2971e..5624ad8 100644
--- a/tests/route/test-routing-table.cpp
+++ b/tests/route/test-routing-table.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis,
+ * Copyright (c) 2014-2022,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -102,7 +102,7 @@
 
 BOOST_FIXTURE_TEST_CASE(RoutingTableDecode1, RoutingTableFixture)
 {
-  RoutingTableStatus rtStatus(ndn::Block(RoutingTableData1, sizeof(RoutingTableData1)));
+  RoutingTableStatus rtStatus(ndn::Block{RoutingTableData1});
 
   auto it1 = rtStatus.m_rTable.begin();
 
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index 0f18dd7..2a1e607 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis,
+ * Copyright (c) 2014-2022,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -24,10 +24,10 @@
 
 #include "common.hpp"
 #include "conf-parameter.hpp"
-#include "identity-management-fixture.hpp"
+#include "route/fib.hpp"
 
 #include "boost-test.hpp"
-#include "route/fib.hpp"
+#include "identity-management-fixture.hpp"
 
 #include <boost/asio.hpp>
 
@@ -132,7 +132,7 @@
     payload2.wireEncode(buffer);
     payload1.wireEncode(buffer);
 
-    this->sendDatasetReply(prefix, buffer.buf(), buffer.size());
+    this->sendDatasetReply(prefix, buffer);
   }
 
   /** \brief send a payload in reply to StatusDataset request
@@ -186,7 +186,6 @@
     conf.setSiteName(siteName);
     conf.setRouterName(routerName);
     conf.buildRouterAndSyncUserPrefix();
-
     conf.setSyncProtocol(protocol);
     conf.setHyperbolicState(hyperbolicState);
   }
diff --git a/tests/test-hello-protocol.cpp b/tests/test-hello-protocol.cpp
index 08adc02..efd8eac 100644
--- a/tests/test-hello-protocol.cpp
+++ b/tests/test-hello-protocol.cpp
@@ -129,10 +129,10 @@
                 Adjacent::STATUS_INACTIVE, 0, 300);
   adjList.insert(adj1);
 
-  ndn::Name dataName = adj1.getName() ;
-  dataName.append(nlsr::HelloProtocol::NLSR_COMPONENT);
-  dataName.append(nlsr::HelloProtocol::INFO_COMPONENT);
-  dataName.append(conf.getRouterPrefix().wireEncode());
+  ndn::Name dataName = adj1.getName();
+  dataName.append(HelloProtocol::NLSR_COMPONENT);
+  dataName.append(HelloProtocol::INFO_COMPONENT);
+  dataName.append(ndn::tlv::GenericNameComponent, conf.getRouterPrefix().wireEncode());
 
   ndn::Data data(ndn::Name(dataName).appendVersion());
   BOOST_CHECK_EQUAL(numOnInitialHelloDataValidates, 0);
diff --git a/tests/test-lsa.cpp b/tests/test-lsa.cpp
index ebb6c4e..d89fef6 100644
--- a/tests/test-lsa.cpp
+++ b/tests/test-lsa.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis,
+ * Copyright (c) 2014-2022,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -31,10 +31,11 @@
 namespace nlsr {
 namespace test {
 
-/*static void
-printBytes(const uint8_t* buf, size_t size)
+/*
+static void
+printBytes(ndn::span<const uint8_t> buf)
 {
-  std::string hex = ndn::toHex(buf, size);
+  std::string hex = ndn::toHex(buf);
 
   for (size_t i = 0; i < hex.size(); i++) {
     if (i > 0 && i % 30 == 0)
@@ -49,7 +50,8 @@
   std::cout << "\n" << "};" << std::endl;
 }
 
-printBytes(wire.wire(), wire.size());*/
+printBytes(block);
+*/
 
 BOOST_AUTO_TEST_SUITE(TestLsa)
 
@@ -90,8 +92,7 @@
   ndn::Name s2{"name2"};
   NamePrefixList npl1{s1, s2};
 
-  ndn::time::system_clock::TimePoint testTimePoint =
-    ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
+  auto testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
 
   // 3rd argument is seqNo
   NameLsa nlsa1("router1", 12, testTimePoint, npl1);
@@ -172,8 +173,7 @@
 {
   ndn::Name routerName("/ndn/site/router");
   ndn::Name adjacencyName("/ndn/site/adjacency");
-  ndn::time::system_clock::TimePoint testTimePoint =
-    ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
+  auto testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
   uint32_t seqNo = 12;
 
   // An AdjLsa initialized with ACTIVE adjacencies should copy the adjacencies
@@ -272,9 +272,8 @@
 
 BOOST_AUTO_TEST_CASE(CoordinateLsaBasic)
 {
-  ndn::time::system_clock::TimePoint testTimePoint =
-    ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
-  std::vector<double> angles1 {30.0}, angles2 {30.0};
+  auto testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
+  std::vector<double> angles1{30.0}, angles2{30.0};
   angles1.push_back(30.0);
   angles2.push_back(30.0);
   CoordinateLsa clsa1("router1", 12, testTimePoint, 2.5, angles1);
@@ -369,7 +368,7 @@
   adjList.insert(adj1);
   adjList.insert(adj2);
 
-  ndn::time::system_clock::TimePoint testTimePoint = ndn::time::system_clock::now();
+  auto testTimePoint = ndn::time::system_clock::now();
 
   AdjLsa adjlsa1("router1", 1, testTimePoint, adjList.size(), adjList);
   AdjLsa adjlsa2(adjlsa1.wireEncode());
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index cd4d0d2..43c5baf 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis,
+ * Copyright (c) 2014-2022,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -48,10 +48,12 @@
   receiveHelloData(const ndn::Name& sender, const ndn::Name& receiver)
   {
     ndn::Name dataName(sender);
-    dataName.append("NLSR").append("INFO").append(receiver.wireEncode()).appendVersion();
+    dataName.append("NLSR")
+            .append("INFO")
+            .append(ndn::tlv::GenericNameComponent, receiver.wireEncode())
+            .appendVersion();
 
     ndn::Data data(dataName);
-
     nlsr.m_helloProtocol.onContentValidated(data);
   }
 
diff --git a/tests/test-statistics.cpp b/tests/test-statistics.cpp
index 2c02bb7..4a5dc5b 100644
--- a/tests/test-statistics.cpp
+++ b/tests/test-statistics.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis,
+ * Copyright (c) 2014-2022,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -20,11 +20,12 @@
  */
 
 #include "statistics.hpp"
-#include "test-common.hpp"
 #include "hello-protocol.hpp"
 #include "lsdb.hpp"
 #include "nlsr.hpp"
 
+#include "test-common.hpp"
+
 #include <ndn-cxx/util/dummy-client-face.hpp>
 #include <boost/lexical_cast.hpp>
 
@@ -158,7 +159,7 @@
   ndn::Name otherName(other.getName());
   otherName.append("NLSR");
   otherName.append("INFO");
-  otherName.append(conf.getRouterPrefix().wireEncode());
+  otherName.append(ndn::tlv::GenericNameComponent, conf.getRouterPrefix().wireEncode());
 
   hello.expressInterest(otherName, 1);
   this->advanceClocks(ndn::time::milliseconds(1), 10);
@@ -168,7 +169,7 @@
   ndn::Name thisName(conf.getRouterPrefix());
   thisName.append("NLSR");
   thisName.append("INFO");
-  thisName.append(other.getName().wireEncode());
+  thisName.append(ndn::tlv::GenericNameComponent, other.getName().wireEncode());
 
   ndn::Interest interest(thisName);
   hello.processInterest(ndn::Name(), interest);
diff --git a/tests/update/test-advertise-crash.cpp b/tests/update/test-advertise-crash.cpp
index 09a27d7..8925469 100644
--- a/tests/update/test-advertise-crash.cpp
+++ b/tests/update/test-advertise-crash.cpp
@@ -83,7 +83,7 @@
   ndn::nfd::ControlParameters parameters;
   parameters.setName("/prefix/to/advertise");
   ndn::Name advertiseCommand("/localhost/nlsr/prefix-update/advertise");
-  advertiseCommand.append(parameters.wireEncode());
+  advertiseCommand.append(ndn::tlv::GenericNameComponent, parameters.wireEncode());
 
   auto advertiseInterest = std::make_shared<ndn::Interest>(advertiseCommand);
   face.receive(*advertiseInterest);
diff --git a/tests/update/test-nfd-rib-command-processor.cpp b/tests/update/test-nfd-rib-command-processor.cpp
index cc23dd0..c9be622 100644
--- a/tests/update/test-nfd-rib-command-processor.cpp
+++ b/tests/update/test-nfd-rib-command-processor.cpp
@@ -54,7 +54,7 @@
   void
   sendCommand(ndn::Name prefix, const ndn::nfd::ControlParameters& parameters)
   {
-    ndn::Interest interest(prefix.append(parameters.wireEncode()));
+    ndn::Interest interest(prefix.append(ndn::tlv::GenericNameComponent, parameters.wireEncode()));
     face.receive(interest);
     this->advanceClocks(ndn::time::milliseconds(10), 10);
   }
diff --git a/tests/update/test-prefix-update-processor.cpp b/tests/update/test-prefix-update-processor.cpp
index 9c20114..ac50943 100644
--- a/tests/update/test-prefix-update-processor.cpp
+++ b/tests/update/test-prefix-update-processor.cpp
@@ -161,7 +161,7 @@
   ndn::Name advertiseCommand("/localhost/nlsr/prefix-update/advertise");
 
   // append /<control-parameters>
-  advertiseCommand.append(parameters.wireEncode());
+  advertiseCommand.append(ndn::tlv::GenericNameComponent, parameters.wireEncode());
 
   ndn::security::InterestSigner signer(m_keyChain);
 
@@ -186,7 +186,7 @@
 
   // Withdraw
   ndn::Name withdrawCommand("/localhost/nlsr/prefix-update/withdraw");
-  withdrawCommand.append(parameters.wireEncode());
+  withdrawCommand.append(ndn::tlv::GenericNameComponent, parameters.wireEncode());
 
   auto withdrawInterest= signer.makeCommandInterest(withdrawCommand,
                                                     ndn::security::signingByIdentity(opIdentity));
diff --git a/tests/update/test-save-delete-prefix.cpp b/tests/update/test-save-delete-prefix.cpp
index 9843489..c4db1bc 100644
--- a/tests/update/test-save-delete-prefix.cpp
+++ b/tests/update/test-save-delete-prefix.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis,
+ * Copyright (c) 2014-2022,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -144,11 +144,11 @@
     ndn::security::InterestSigner signer(m_keyChain);
     // type true for advertise, else withdraw
     if (type == "advertise") {
-      advertiseCommand.append(parameters.wireEncode());
+      advertiseCommand.append(ndn::tlv::GenericNameComponent, parameters.wireEncode());
       return signer.makeCommandInterest(advertiseCommand, ndn::security::signingByIdentity(opIdentity));
     }
     else {
-      withdrawCommand.append(parameters.wireEncode());
+      withdrawCommand.append(ndn::tlv::GenericNameComponent, parameters.wireEncode());
       return signer.makeCommandInterest(withdrawCommand, ndn::security::signingByIdentity(opIdentity));
     }
   }
