diff --git a/tests/test-consumer.cpp b/tests/test-consumer.cpp
index 62715bb..5f60a7f 100644
--- a/tests/test-consumer.cpp
+++ b/tests/test-consumer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -26,13 +26,13 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Name;
 
 BOOST_AUTO_TEST_SUITE(TestConsumer)
 
 BOOST_AUTO_TEST_CASE(AddSubscription)
 {
-  util::DummyClientFace face;
+  ndn::DummyClientFace face;
   Consumer consumer(Name("/psync"), face,
                     [] (const auto&) {},
                     [] (const auto&) {},
@@ -47,7 +47,7 @@
 
 BOOST_AUTO_TEST_CASE(RemoveSubscription)
 {
-  util::DummyClientFace face;
+  ndn::DummyClientFace face;
   Consumer consumer(Name("/psync"), face,
                     [] (const auto&) {},
                     [] (const auto&) {},
@@ -64,7 +64,7 @@
 
 BOOST_FIXTURE_TEST_CASE(ConstantTimeoutForFirstSegment, tests::IoFixture)
 {
-  util::DummyClientFace face(m_io);
+  ndn::DummyClientFace face(m_io);
   Consumer consumer(Name("/psync"), face,
                     [] (const auto&) {},
                     [] (const auto&) {},
diff --git a/tests/test-full-producer.cpp b/tests/test-full-producer.cpp
index 7218e6b..ba8260c 100644
--- a/tests/test-full-producer.cpp
+++ b/tests/test-full-producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -28,12 +28,13 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Interest;
+using ndn::Name;
 
 class FullProducerFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
 protected:
-  util::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
+  ndn::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestFullProducer, FullProducerFixture)
@@ -71,7 +72,7 @@
   node.m_iblt.appendToName(syncInterestName);
   Interest syncInterest(syncInterestName);
 
-  auto badCompress = std::make_shared<const Buffer>(5);
+  auto badCompress = std::make_shared<const ndn::Buffer>(5);
   BOOST_CHECK_NO_THROW(node.onSyncData(syncInterest, badCompress));
 
   const uint8_t test[] = {'t', 'e', 's', 't'};
diff --git a/tests/test-full-sync.cpp b/tests/test-full-sync.cpp
index e0b9bc9..91f95db 100644
--- a/tests/test-full-sync.cpp
+++ b/tests/test-full-sync.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -31,7 +31,8 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Interest;
+using ndn::Name;
 
 class FullSyncFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
@@ -41,8 +42,8 @@
   {
     BOOST_ASSERT(id >= 0 && id < MAX_NODES);
     userPrefixes[id] = "/userPrefix" + std::to_string(id);
-    faces[id] = std::make_unique<util::DummyClientFace>(m_io, m_keyChain,
-                                                        util::DummyClientFace::Options{true, true});
+    faces[id] = std::make_unique<ndn::DummyClientFace>(m_io, m_keyChain,
+                                                       ndn::DummyClientFace::Options{true, true});
     nodes[id] = std::make_unique<FullProducer>(*faces[id], m_keyChain, 40, syncPrefix, userPrefixes[id],
                                                [] (const auto&) {});
   }
@@ -174,7 +175,7 @@
   const Name syncPrefix = "/psync";
   static constexpr int MAX_NODES = 4;
   std::array<Name, MAX_NODES> userPrefixes;
-  std::array<std::unique_ptr<util::DummyClientFace>, MAX_NODES> faces;
+  std::array<std::unique_ptr<ndn::DummyClientFace>, MAX_NODES> faces;
   std::array<std::unique_ptr<FullProducer>, MAX_NODES> nodes;
   static constexpr uint64_t NOT_EXIST = std::numeric_limits<uint64_t>::max();
 };
@@ -467,7 +468,7 @@
 
   int i = 0;
   detail::State state;
-  std::shared_ptr<Buffer> compressed;
+  std::shared_ptr<ndn::Buffer> compressed;
   do {
     auto prefixToPublish = makeSubPrefix(0, i++);
     nodes[0]->addUserNode(prefixToPublish);
@@ -477,7 +478,7 @@
 
     auto block = state.wireEncode();
     compressed = detail::compress(nodes[0]->m_contentCompression, block);
-  } while (compressed->size() < (MAX_NDN_PACKET_SIZE >> 1));
+  } while (compressed->size() < (ndn::MAX_NDN_PACKET_SIZE >> 1));
 
   advanceClocks(10_ms, 100);
 
diff --git a/tests/test-iblt.cpp b/tests/test-iblt.cpp
index e5ce12f..7843558 100644
--- a/tests/test-iblt.cpp
+++ b/tests/test-iblt.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -25,7 +25,7 @@
 namespace psync {
 namespace detail {
 
-using namespace ndn;
+using ndn::Name;
 
 BOOST_AUTO_TEST_SUITE(TestIBLT)
 
@@ -96,7 +96,7 @@
   Name malformedName("/test");
   auto compressed = compress(CompressionScheme::DEFAULT,
                              malformedName.wireEncode().value_bytes());
-  malformedName.append(name::Component(std::move(compressed)));
+  malformedName.append(Name::Component(std::move(compressed)));
   IBLT rcvd2(size, CompressionScheme::DEFAULT);
   BOOST_CHECK_THROW(rcvd2.initialize(malformedName.at(-1)), IBLT::Error);
 }
diff --git a/tests/test-partial-producer.cpp b/tests/test-partial-producer.cpp
index 3f2ab95..50d7386 100644
--- a/tests/test-partial-producer.cpp
+++ b/tests/test-partial-producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -27,12 +27,13 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Interest;
+using ndn::Name;
 
 class PartialProducerFixture : public tests::KeyChainFixture
 {
 protected:
-  util::DummyClientFace m_face{m_keyChain, {true, true}};
+  ndn::DummyClientFace m_face{m_keyChain, {true, true}};
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestPartialProducer, PartialProducerFixture)
@@ -46,8 +47,8 @@
 
   BOOST_REQUIRE_EQUAL(m_face.sentInterests.size(), 1);
   auto interest = m_face.sentInterests.front();
-  BOOST_CHECK_EQUAL(interest.getName().at(3), name::Component("register"));
-  nfd::ControlParameters params(interest.getName().at(4).blockFromValue());
+  BOOST_CHECK_EQUAL(interest.getName().at(3), Name::Component("register"));
+  ndn::nfd::ControlParameters params(interest.getName().at(4).blockFromValue());
   BOOST_CHECK_EQUAL(params.getName(), syncPrefix);
 }
 
diff --git a/tests/test-partial-sync.cpp b/tests/test-partial-sync.cpp
index 801d061..2526d2c 100644
--- a/tests/test-partial-sync.cpp
+++ b/tests/test-partial-sync.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -29,7 +29,8 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Interest;
+using ndn::Name;
 
 class PartialSyncFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
@@ -52,8 +53,8 @@
   void
   addConsumer(int id, const std::vector<std::string>& subscribeTo, bool linkToProducer = true)
   {
-    consumerFaces[id] = std::make_unique<util::DummyClientFace>(m_io, m_keyChain,
-                                                                util::DummyClientFace::Options{true, true});
+    consumerFaces[id] = std::make_unique<ndn::DummyClientFace>(m_io, m_keyChain,
+                                                               ndn::DummyClientFace::Options{true, true});
     if (linkToProducer) {
       face.linkTo(*consumerFaces[id]);
     }
@@ -132,7 +133,7 @@
   }
 
 protected:
-  util::DummyClientFace face{m_io, m_keyChain, {true, true}};
+  ndn::DummyClientFace face{m_io, m_keyChain, {true, true}};
   const Name syncPrefix{"psync"};
   const Name userPrefix{"testUser-0"};
 
@@ -140,7 +141,7 @@
   std::map<Name, uint64_t> oldSeqMap;
 
   std::array<std::unique_ptr<Consumer>, 3> consumers;
-  std::array<std::unique_ptr<util::DummyClientFace>, 3> consumerFaces;
+  std::array<std::unique_ptr<ndn::DummyClientFace>, 3> consumerFaces;
   int numHelloDataRcvd = 0;
   int numSyncDataRcvd = 0;
 };
@@ -289,7 +290,7 @@
   // Link to first producer goes down
   face.unlink();
 
-  util::DummyClientFace face2(m_io, m_keyChain, {true, true});
+  ndn::DummyClientFace face2(m_io, m_keyChain, {true, true});
   PartialProducer replicatedProducer(face2, m_keyChain, 40, syncPrefix, userPrefix);
   for (int i = 1; i < 10; i++) {
     replicatedProducer.addUserNode("testUser-" + std::to_string(i));
@@ -339,7 +340,7 @@
 
   bool nackRcvd = false;
   for (const auto& data : face.sentData) {
-    if (data.getContentType() == tlv::ContentType_Nack) {
+    if (data.getContentType() == ndn::tlv::ContentType_Nack) {
       nackRcvd = true;
       break;
     }
diff --git a/tests/test-producer-base.cpp b/tests/test-producer-base.cpp
index 67d4aa2..4886339 100644
--- a/tests/test-producer-base.cpp
+++ b/tests/test-producer-base.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -26,12 +26,12 @@
 
 namespace psync {
 
-using namespace ndn;
+using ndn::Name;
 
 class ProducerBaseFixture : public tests::KeyChainFixture
 {
 protected:
-  util::DummyClientFace m_face;
+  ndn::DummyClientFace m_face;
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestProducerBase, ProducerBaseFixture)
@@ -73,7 +73,7 @@
   m_face.processEvents(10_ms);
 
   BOOST_REQUIRE_EQUAL(m_face.sentData.size(), 1);
-  BOOST_CHECK_EQUAL(m_face.sentData.front().getContentType(), tlv::ContentType_Nack);
+  BOOST_CHECK_EQUAL(m_face.sentData.front().getContentType(), ndn::tlv::ContentType_Nack);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/test-segment-publisher.cpp b/tests/test-segment-publisher.cpp
index 210555d..e363523 100644
--- a/tests/test-segment-publisher.cpp
+++ b/tests/test-segment-publisher.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  The University of Memphis
+ * Copyright (c) 2014-2023,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -30,14 +30,16 @@
 
 namespace psync {
 
-using namespace ndn;
+using namespace ndn::time_literals;
+using ndn::Interest;
+using ndn::Name;
 
 class SegmentPublisherFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
 protected:
   SegmentPublisherFixture()
   {
-    m_face.setInterestFilter(InterestFilter("/hello/world"),
+    m_face.setInterestFilter(ndn::InterestFilter("/hello/world"),
                              bind(&SegmentPublisherFixture::onInterest, this, _2),
                              [] (auto&&...) { BOOST_CHECK(false); });
     advanceClocks(10_ms);
@@ -55,7 +57,7 @@
   void
   expressInterest(const Interest& interest)
   {
-    fetcher = util::SegmentFetcher::start(m_face, interest, security::getAcceptAllValidator());
+    fetcher = ndn::SegmentFetcher::start(m_face, interest, ndn::security::getAcceptAllValidator());
     fetcher->onComplete.connect([this] (auto&&...) { numComplete++; });
     fetcher->onError.connect([] (auto&&...) { BOOST_CHECK(false); });
 
@@ -80,16 +82,16 @@
   }
 
 protected:
-  util::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
+  ndn::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
   SegmentPublisher publisher{m_face, m_keyChain};
-  std::shared_ptr<util::SegmentFetcher> fetcher;
+  std::shared_ptr<ndn::SegmentFetcher> fetcher;
   Name dataName;
   detail::State state;
 
   int numComplete = 0;
   int numRepliesFromStore = 0;
 
-  static constexpr time::milliseconds freshness = 1_s;
+  static constexpr ndn::time::milliseconds freshness = 1_s;
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestSegmentPublisher, SegmentPublisherFixture)
