diff --git a/tests/core/segment-publisher.cpp b/tests/core/segment-publisher.cpp
index 8817669..08fc226 100644
--- a/tests/core/segment-publisher.cpp
+++ b/tests/core/segment-publisher.cpp
@@ -75,7 +75,7 @@
     size_t totalLength = 0;
     for (int64_t i = 0; i < N; i++)
       {
-        totalLength += prependNonNegativeIntegerBlock(outBuffer, ndn::Tlv::Content, i);
+        totalLength += prependNonNegativeIntegerBlock(outBuffer, tlv::Content, i);
       }
     m_totalPayloadLength += totalLength;
     return totalLength;
@@ -113,7 +113,7 @@
 
     // wrap data in a single Content TLV for easy parsing
     m_buffer.prependVarNumber(m_buffer.size());
-    m_buffer.prependVarNumber(ndn::Tlv::Content);
+    m_buffer.prependVarNumber(tlv::Content);
 
     BOOST_TEST_CHECKPOINT("creating parser");
     ndn::Block parser(m_buffer.buf(), m_buffer.size());
diff --git a/tests/daemon/mgmt/channel-status-publisher.cpp b/tests/daemon/mgmt/channel-status-publisher.cpp
index 6d33f4d..370efe1 100644
--- a/tests/daemon/mgmt/channel-status-publisher.cpp
+++ b/tests/daemon/mgmt/channel-status-publisher.cpp
@@ -73,7 +73,7 @@
 
     // wrap the Channel Status entries in a single Content TLV for easy parsing
     m_buffer.prependVarNumber(m_buffer.size());
-    m_buffer.prependVarNumber(ndn::Tlv::Content);
+    m_buffer.prependVarNumber(tlv::Content);
 
     ndn::Block parser(m_buffer.buf(), m_buffer.size());
     parser.parse();
diff --git a/tests/daemon/mgmt/face-status-publisher-common.hpp b/tests/daemon/mgmt/face-status-publisher-common.hpp
index e2f19f1..11f4913 100644
--- a/tests/daemon/mgmt/face-status-publisher-common.hpp
+++ b/tests/daemon/mgmt/face-status-publisher-common.hpp
@@ -82,7 +82,7 @@
     }
   std::stringstream error;
   error << "expected type " << type << " got " << block.type();
-  throw ndn::Tlv::Error(error.str());
+  throw tlv::Error(error.str());
 }
 
 static inline uint64_t
@@ -96,7 +96,7 @@
       ++i;
       return readNonNegativeIntegerType(block, type);
     }
-  throw ndn::Tlv::Error("Unexpected end of FaceStatus");
+  throw tlv::Error("Unexpected end of FaceStatus");
 }
 
 class FaceStatusPublisherFixture : public BaseFixture
@@ -179,7 +179,7 @@
 
     // wrap the Face Statuses in a single Content TLV for easy parsing
     m_buffer.prependVarNumber(m_buffer.size());
-    m_buffer.prependVarNumber(ndn::Tlv::Content);
+    m_buffer.prependVarNumber(tlv::Content);
 
     ndn::Block parser(m_buffer.buf(), m_buffer.size());
     parser.parse();
diff --git a/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp b/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp
index bfb19d9..cbb7280 100644
--- a/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp
+++ b/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp
@@ -51,7 +51,7 @@
     }
   std::stringstream error;
   error << "Expected type " << type << " got " << block.type();
-  throw ndn::Tlv::Error(error.str());
+  throw tlv::Error(error.str());
 }
 
 static inline uint64_t
@@ -68,7 +68,7 @@
   std::stringstream error;
   error << "Unexpected end of Block while attempting to read type #"
         << type;
-  throw ndn::Tlv::Error(error.str());
+  throw tlv::Error(error.str());
 }
 
 class FibEnumerationPublisherFixture : public BaseFixture
@@ -120,7 +120,7 @@
     BOOST_REQUIRE(i != entry.elements_end());
 
 
-    BOOST_REQUIRE(i->type() == ndn::Tlv::Name);
+    BOOST_REQUIRE(i->type() == tlv::Name);
     Name prefix(*i);
     ++i;
 
@@ -181,7 +181,7 @@
 
     // wrap the FIB Entry blocks in a single Content TLV for easy parsing
     m_buffer.prependVarNumber(m_buffer.size());
-    m_buffer.prependVarNumber(ndn::Tlv::Content);
+    m_buffer.prependVarNumber(tlv::Content);
 
     ndn::Block parser(m_buffer.buf(), m_buffer.size());
     parser.parse();
diff --git a/tests/daemon/mgmt/strategy-choice-publisher.cpp b/tests/daemon/mgmt/strategy-choice-publisher.cpp
index fda3e1e..e85bc4a 100644
--- a/tests/daemon/mgmt/strategy-choice-publisher.cpp
+++ b/tests/daemon/mgmt/strategy-choice-publisher.cpp
@@ -79,7 +79,7 @@
 
     // wrap the Strategy Choice entries in a single Content TLV for easy parsing
     m_buffer.prependVarNumber(m_buffer.size());
-    m_buffer.prependVarNumber(ndn::Tlv::Content);
+    m_buffer.prependVarNumber(tlv::Content);
 
     ndn::Block parser(m_buffer.buf(), m_buffer.size());
     parser.parse();
diff --git a/tests/rib/rib-status-publisher-common.hpp b/tests/rib/rib-status-publisher-common.hpp
index 11728a0..58ccd68 100644
--- a/tests/rib/rib-status-publisher-common.hpp
+++ b/tests/rib/rib-status-publisher-common.hpp
@@ -70,7 +70,7 @@
 
     buffer.appendByteArray(payload.value(), payload.value_size());
     buffer.prependVarNumber(buffer.size());
-    buffer.prependVarNumber(ndn::Tlv::Content);
+    buffer.prependVarNumber(tlv::Content);
 
     ndn::Block parser(buffer.buf(), buffer.size());
     parser.parse();
