diff --git a/tests/test-link-state-calculator.cpp b/tests/test-link-state-calculator.cpp
index 8aee304..d0605f3 100644
--- a/tests/test-link-state-calculator.cpp
+++ b/tests/test-link-state-calculator.cpp
@@ -175,7 +175,7 @@
 BOOST_AUTO_TEST_CASE(Asymmetric)
 {
   // Asymmetric link cost between B and C
-  ndn::Name key = ndn::Name(ROUTER_B_NAME).append(AdjLsa::TYPE_STRING);
+  ndn::Name key = ndn::Name(ROUTER_B_NAME).append(std::to_string(Lsa::Type::ADJACENCY));
   AdjLsa* lsa = nlsr.getLsdb().findAdjLsa(key);
   BOOST_REQUIRE(lsa != nullptr);
 
@@ -224,7 +224,7 @@
 BOOST_AUTO_TEST_CASE(AsymmetricZeroCost)
 {
   // Asymmetric link cost between B and C
-  ndn::Name key = ndn::Name(ROUTER_B_NAME).append(AdjLsa::TYPE_STRING);
+  ndn::Name key = ndn::Name(ROUTER_B_NAME).append(std::to_string(Lsa::Type::ADJACENCY));
   AdjLsa* lsa = nlsr.getLsdb().findAdjLsa(key);
   BOOST_REQUIRE(lsa != nullptr);
 
diff --git a/tests/test-lsa-rule.cpp b/tests/test-lsa-rule.cpp
index e7f6a69..0ec3ff5 100644
--- a/tests/test-lsa-rule.cpp
+++ b/tests/test-lsa-rule.cpp
@@ -171,7 +171,7 @@
   lsaInterestName.append(nlsr.getConfParameter().getRouterName());
 
   // Append LSA type
-  lsaInterestName.append(ndn::Name("name"));
+  lsaInterestName.append(std::to_string(Lsa::Type::NAME));
 
   // This would be the sequence number of its own NameLsa
   lsaInterestName.appendNumber(nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
@@ -202,7 +202,7 @@
   lsaInterestName.append(nlsr.getConfParameter().getRouterName());
 
   // Append LSA type
-  lsaInterestName.append(ndn::Name("name"));
+  lsaInterestName.append(std::to_string(Lsa::Type::NAME));
 
   // This would be the sequence number of its own NameLsa
   lsaInterestName.appendNumber(nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
diff --git a/tests/test-lsa.cpp b/tests/test-lsa.cpp
index 2750bb4..c7851f8 100644
--- a/tests/test-lsa.cpp
+++ b/tests/test-lsa.cpp
@@ -47,7 +47,7 @@
   NameLsa nlsa1("router1", 12, testTimePoint, npl1);
   NameLsa nlsa2("router2", 12, testTimePoint, npl1);
 
-  BOOST_CHECK_EQUAL(nlsa1.getLsType(), NameLsa::TYPE_STRING);
+  BOOST_CHECK_EQUAL(nlsa1.getType(), Lsa::Type::NAME);
 
   BOOST_CHECK(nlsa1.getExpirationTimePoint() == nlsa2.getExpirationTimePoint());
 
@@ -70,7 +70,7 @@
   AdjLsa alsa1(routerName, seqNo, testTimePoint,
                activeAdjacencies.size(), activeAdjacencies);
   BOOST_CHECK_EQUAL(alsa1.getAdl().size(), 1);
-  BOOST_CHECK_EQUAL(alsa1.getLsType(), AdjLsa::TYPE_STRING);
+  BOOST_CHECK_EQUAL(alsa1.getType(), Lsa::Type::ADJACENCY);
   BOOST_CHECK_EQUAL(alsa1.getLsSeqNo(), seqNo);
   BOOST_CHECK_EQUAL(alsa1.getExpirationTimePoint(), testTimePoint);
   BOOST_CHECK_EQUAL(alsa1.getNoLink(), 1);
@@ -135,7 +135,7 @@
   std::string EXPECTED_OUTPUT =
    "Adj Lsa:\n"
    "  Origination Router: /router1\n"
-   "  Ls Type: adjacency\n"
+   "  Ls Type: ADJACENCY\n"
    "  Ls Seq No: 12\n"
    "  Ls Lifetime: " + TEST_TIME_POINT_STRING + "\n"
    "  Adjacents: \n"
diff --git a/tests/test-lsdb.cpp b/tests/test-lsdb.cpp
index 866c91b..e04c74b 100644
--- a/tests/test-lsdb.cpp
+++ b/tests/test-lsdb.cpp
@@ -187,7 +187,7 @@
   std::string expectedDataContent = lsa.getData();
   lsdb.installNameLsa(lsa);
 
-  ndn::Name interestName("/ndn/NLSR/LSA/cs/%C1.Router/router1/name/");
+  ndn::Name interestName("/ndn/NLSR/LSA/cs/%C1.Router/router1/NAME/");
   interestName.appendNumber(seqNo);
 
   ndn::Interest interest(interestName);
@@ -223,7 +223,7 @@
     lsa.addName(ndn::Name(prefix).appendNumber(nPrefixes));
   }
 
-  ndn::Name interestName("/ndn/NLSR/LSA/cs/%C1.Router/router1/name/");
+  ndn::Name interestName("/ndn/NLSR/LSA/cs/%C1.Router/router1/NAME/");
   interestName.appendNumber(seqNo);
 
   const ndn::ConstBufferPtr bufferPtr = std::make_shared<ndn::Buffer>(lsa.getData().c_str(),
@@ -258,11 +258,11 @@
   lsdb1.installNameLsa(nlsa1);
   lsdb1.writeNameLsdbLog();
 
-  BOOST_CHECK(lsdb1.doesLsaExist(ndn::Name("/router1/1/name"), NameLsa::TYPE_STRING));
+  BOOST_CHECK(lsdb1.doesLsaExist(ndn::Name("/router1/1/NAME"), Lsa::Type::NAME));
 
   lsdb1.removeNameLsa(router1);
 
-  BOOST_CHECK_EQUAL(lsdb1.doesLsaExist(ndn::Name("/router1/1"), NameLsa::TYPE_STRING), false);
+  BOOST_CHECK_EQUAL(lsdb1.doesLsaExist(ndn::Name("/router1/1"), Lsa::Type::NAME), false);
 }
 
 BOOST_AUTO_TEST_CASE(InstallNameLsa)
@@ -281,8 +281,8 @@
   NameLsa lsa(otherRouter, 1, MAX_TIME, prefixes);
   lsdb.installNameLsa(lsa);
 
-  BOOST_REQUIRE_EQUAL(lsdb.doesLsaExist(otherRouter + "/name", NameLsa::TYPE_STRING), true);
-  NamePrefixList& nameList = lsdb.findNameLsa(otherRouter + "/name")->getNpl();
+  BOOST_REQUIRE_EQUAL(lsdb.doesLsaExist(otherRouter + "/NAME", Lsa::Type::NAME), true);
+  NamePrefixList& nameList = lsdb.findNameLsa(otherRouter + "/NAME")->getNpl();
 
   BOOST_CHECK_EQUAL(nameList, prefixes);
   //areNamePrefixListsEqual(nameList, prefixes);
@@ -346,15 +346,15 @@
 
   // Lower NameLSA sequence number
   uint64_t lowerSeqNo = 998;
-  BOOST_CHECK(!lsdb.isLsaNew(originRouter, NameLsa::TYPE_STRING, lowerSeqNo));
+  BOOST_CHECK(!lsdb.isLsaNew(originRouter, Lsa::Type::NAME, lowerSeqNo));
 
   // Same NameLSA sequence number
   uint64_t sameSeqNo = 999;
-  BOOST_CHECK(!lsdb.isLsaNew(originRouter, NameLsa::TYPE_STRING, sameSeqNo));
+  BOOST_CHECK(!lsdb.isLsaNew(originRouter, Lsa::Type::NAME, sameSeqNo));
 
   // Higher NameLSA sequence number
   uint64_t higherSeqNo = 1000;
-  BOOST_CHECK(lsdb.isLsaNew(originRouter, NameLsa::TYPE_STRING, higherSeqNo));
+  BOOST_CHECK(lsdb.isLsaNew(originRouter, Lsa::Type::NAME, higherSeqNo));
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestLsdb
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index 48cd7bf..fe30864 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -68,13 +68,16 @@
 BOOST_AUTO_TEST_CASE(HyperbolicOn_ZeroCostNeighbors)
 {
   // Simulate loading configuration file
-  Adjacent neighborA("/ndn/neighborA", ndn::util::FaceUri("udp4://10.0.0.1"), 25, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborA("/ndn/neighborA", ndn::util::FaceUri("udp4://10.0.0.1"), 25,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborA);
 
-  Adjacent neighborB("/ndn/neighborB", ndn::util::FaceUri("udp4://10.0.0.2"), 10, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborB("/ndn/neighborB", ndn::util::FaceUri("udp4://10.0.0.2"), 10,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborB);
 
-  Adjacent neighborC("/ndn/neighborC", ndn::util::FaceUri("udp4://10.0.0.3"), 17, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborC("/ndn/neighborC", ndn::util::FaceUri("udp4://10.0.0.3"), 17,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborC);
 
   nlsr.getConfParameter().setHyperbolicState(HYPERBOLIC_STATE_ON);
@@ -91,13 +94,16 @@
 BOOST_AUTO_TEST_CASE(HyperbolicOff_LinkStateCost)
 {
   // Simulate loading configuration file
-  Adjacent neighborA("/ndn/neighborA", ndn::util::FaceUri("udp4://10.0.0.1"), 25, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborA("/ndn/neighborA", ndn::util::FaceUri("udp4://10.0.0.1"), 25,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborA);
 
-  Adjacent neighborB("/ndn/neighborB", ndn::util::FaceUri("udp4://10.0.0.2"), 10, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborB("/ndn/neighborB", ndn::util::FaceUri("udp4://10.0.0.2"), 10,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborB);
 
-  Adjacent neighborC("/ndn/neighborC", ndn::util::FaceUri("udp4://10.0.0.3"), 17, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborC("/ndn/neighborC", ndn::util::FaceUri("udp4://10.0.0.3"), 17,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborC);
 
   nlsr.initialize();
@@ -131,7 +137,8 @@
   // Setting constants for the unit test
   const uint32_t faceId = 1;
   const std::string faceUri = "udp4://10.0.0.1:6363";
-  Adjacent neighbor("/ndn/neighborA", ndn::util::FaceUri(faceUri), 10, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighbor("/ndn/neighborA", ndn::util::FaceUri(faceUri), 10,
+                    Adjacent::STATUS_INACTIVE, 0, 0);
   BOOST_REQUIRE_EQUAL(nlsr.getAdjacencyList().insert(neighbor), 0);
 
   this->advanceClocks(ndn::time::milliseconds(1));
@@ -162,7 +169,8 @@
   const uint32_t faceId = 1;
   const std::string eventUri = "udp4://10.0.0.1:6363";
   const std::string neighborUri = "udp4://10.0.0.2:6363";
-  Adjacent neighbor("/ndn/neighborA", ndn::util::FaceUri(neighborUri), 10, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighbor("/ndn/neighborA", ndn::util::FaceUri(neighborUri), 10,
+                    Adjacent::STATUS_INACTIVE, 0, 0);
   nlsr.getAdjacencyList().insert(neighbor);
 
   // Build, sign, and send the Face Event
@@ -190,7 +198,8 @@
   const uint32_t eventFaceId = 1;
   const uint32_t neighborFaceId = 2;
   const std::string faceUri = "udp4://10.0.0.1:6363";
-  Adjacent neighbor("/ndn/neighborA", ndn::util::FaceUri(faceUri), 10, Adjacent::STATUS_ACTIVE, 0, neighborFaceId);
+  Adjacent neighbor("/ndn/neighborA", ndn::util::FaceUri(faceUri), 10,
+                    Adjacent::STATUS_ACTIVE, 0, neighborFaceId);
   nlsr.getAdjacencyList().insert(neighbor);
 
   // Build, sign, and send the Face Event
@@ -214,7 +223,8 @@
 
 BOOST_FIXTURE_TEST_CASE(FaceDestroyEvent, UnitTestTimeFixture)
 {
-  std::shared_ptr<ndn::util::DummyClientFace> face = std::make_shared<ndn::util::DummyClientFace>(g_ioService);
+  std::shared_ptr<ndn::util::DummyClientFace> face =
+    std::make_shared<ndn::util::DummyClientFace>(g_ioService);
   Nlsr nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain);
   Lsdb& lsdb = nlsr.getLsdb();
 
@@ -236,7 +246,8 @@
   neighbors.insert(failNeighbor);
 
   // Create an additional neighbor so an adjacency LSA can be built after the face is destroyed
-  Adjacent otherNeighbor("/ndn/neighborB", ndn::util::FaceUri("udp4://10.0.0.2"), 10, Adjacent::STATUS_ACTIVE, 0, 256);
+  Adjacent otherNeighbor("/ndn/neighborB", ndn::util::FaceUri("udp4://10.0.0.2"), 10,
+                         Adjacent::STATUS_ACTIVE, 0, 256);
   neighbors.insert(otherNeighbor);
 
   nlsr.initialize();
@@ -246,7 +257,8 @@
 
   // Set up adjacency LSAs
   // This router
-  Adjacent thisRouter(conf.getRouterPrefix(), ndn::util::FaceUri("udp4://10.0.0.3"), 10, Adjacent::STATUS_ACTIVE, 0, 256);
+  Adjacent thisRouter(conf.getRouterPrefix(), ndn::util::FaceUri("udp4://10.0.0.3"), 10,
+                      Adjacent::STATUS_ACTIVE, 0, 256);
 
   AdjLsa ownAdjLsa(conf.getRouterPrefix(), 10, ndn::time::system_clock::now(), 1, neighbors);
   lsdb.installAdjLsa(ownAdjLsa);
@@ -273,7 +285,8 @@
   this->advanceClocks(ndn::time::milliseconds(1));
 
   // Make sure an adjacency LSA was built
-  ndn::Name key = ndn::Name(nlsr.getConfParameter().getRouterPrefix()).append(AdjLsa::TYPE_STRING);
+  ndn::Name key = ndn::Name(nlsr.getConfParameter().getRouterPrefix())
+    .append(std::to_string(Lsa::Type::ADJACENCY));
   AdjLsa* lsa = lsdb.findAdjLsa(key);
   BOOST_REQUIRE(lsa != nullptr);
 
@@ -374,12 +387,14 @@
   // Add neighbors
   // Router A
   ndn::Name neighborAName("/ndn/site/%C1.router/routerA");
-  Adjacent neighborA(neighborAName, ndn::util::FaceUri("udp4://10.0.0.1"), 0, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborA(neighborAName, ndn::util::FaceUri("udp4://10.0.0.1"), 0,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborA);
 
   // Router B
   ndn::Name neighborBName("/ndn/site/%C1.router/routerB");
-  Adjacent neighborB(neighborBName, ndn::util::FaceUri("udp4://10.0.0.1"), 0, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborB(neighborBName, ndn::util::FaceUri("udp4://10.0.0.1"), 0,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborB);
 
   nlsr.initialize();
@@ -389,7 +404,7 @@
   receiveHelloData(neighborAName, conf.getRouterPrefix());
   this->advanceClocks(ndn::time::seconds(1));
 
-  ndn::Name lsaKey = ndn::Name(conf.getRouterPrefix()).append(AdjLsa::TYPE_STRING);
+  ndn::Name lsaKey = ndn::Name(conf.getRouterPrefix()).append(std::to_string(Lsa::Type::ADJACENCY));
 
   // Adjacency LSA should be built even though other router is INACTIVE
   AdjLsa* lsa = lsdb.findAdjLsa(lsaKey);
@@ -440,12 +455,14 @@
     nlsr.initialize();
   };
   std::function<void(std::list<Adjacent>::iterator)> thenCallback =
-    [this, &thenCallback, &finallyCallback, &nCanonizationsLeft] (std::list<Adjacent>::iterator iterator) {
+    [this, &thenCallback, &finallyCallback, &nCanonizationsLeft]
+    (std::list<Adjacent>::iterator iterator) {
       nCanonizationsLeft--;
       nlsr.canonizeNeighborUris(iterator, thenCallback, finallyCallback);
   };
   nlsr.canonizeNeighborUris(nlsr.getAdjacencyList().getAdjList().begin(),
-                            [&thenCallback, &finallyCallback] (std::list<Adjacent>::iterator iterator) {
+                            [&thenCallback, &finallyCallback]
+                            (std::list<Adjacent>::iterator iterator) {
                               thenCallback(iterator);
                             },
                             finallyCallback);
@@ -504,10 +521,12 @@
 
 BOOST_AUTO_TEST_CASE(FaceDatasetProcess)
 {
-  Adjacent neighborA("/ndn/neighborA", ndn::util::FaceUri("udp4://192.168.0.100:6363"), 25, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborA("/ndn/neighborA", ndn::util::FaceUri("udp4://192.168.0.100:6363"), 25,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborA);
 
-  Adjacent neighborB("/ndn/neighborB", ndn::util::FaceUri("udp4://192.168.0.101:6363"), 10, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborB("/ndn/neighborB", ndn::util::FaceUri("udp4://192.168.0.101:6363"), 10,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborB);
 
   ndn::nfd::FaceStatus payload1;
@@ -529,7 +548,8 @@
 
 BOOST_AUTO_TEST_CASE(UnconfiguredNeighbor)
 {
-  Adjacent neighborA("/ndn/neighborA", ndn::util::FaceUri("udp4://192.168.0.100:6363"), 25, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborA("/ndn/neighborA", ndn::util::FaceUri("udp4://192.168.0.100:6363"), 25,
+                     Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborA);
 
   ndn::nfd::FaceStatus payload;
diff --git a/tests/test-statistics.cpp b/tests/test-statistics.cpp
index bcfc29c..ad2f0d9 100644
--- a/tests/test-statistics.cpp
+++ b/tests/test-statistics.cpp
@@ -200,21 +200,25 @@
   uint32_t seqNo = 1;
 
   // Adjacency LSA
-  sendInterestAndCheckStats(interestPrefix, AdjLsa::TYPE_STRING, seqNo, Statistics::PacketType::SENT_ADJ_LSA_INTEREST);
+  sendInterestAndCheckStats(interestPrefix, std::to_string(Lsa::Type::ADJACENCY), seqNo,
+                            Statistics::PacketType::SENT_ADJ_LSA_INTEREST);
 
   // Coordinate LSA
-  sendInterestAndCheckStats(interestPrefix, CoordinateLsa::TYPE_STRING, seqNo, Statistics::PacketType::SENT_COORD_LSA_INTEREST);
+  sendInterestAndCheckStats(interestPrefix, std::to_string(Lsa::Type::COORDINATE), seqNo,
+                            Statistics::PacketType::SENT_COORD_LSA_INTEREST);
 
   // Name LSA
-  sendInterestAndCheckStats(interestPrefix, NameLsa::TYPE_STRING, seqNo, Statistics::PacketType::SENT_NAME_LSA_INTEREST);
+  sendInterestAndCheckStats(interestPrefix, std::to_string(Lsa::Type::NAME), seqNo,
+                            Statistics::PacketType::SENT_NAME_LSA_INTEREST);
 
   // 3 total lsa interests were sent
   BOOST_CHECK_EQUAL(collector.getStatistics().get(Statistics::PacketType::SENT_LSA_INTEREST), 3);
 }
 
 /*
- * Tests the statistics collected upon processing incoming lsa interests and respective outgoing data.
- * This process will trigger both an increment for received lsa interest and sent lsa data.
+ * Tests the statistics collected upon processing incoming lsa
+ * interests and respective outgoing data. This process will trigger
+ * both an increment for received lsa interest and sent lsa data.
  *
  * /sa receiveInterestAndCheckSentStats
  */
@@ -238,7 +242,7 @@
 
   // Receive Adjacency LSA Interest
   receiveInterestAndCheckSentStats(interestPrefix,
-                                   AdjLsa::TYPE_STRING,
+                                   std::to_string(Lsa::Type::ADJACENCY),
                                    seqNo,
                                    Statistics::PacketType::RCV_ADJ_LSA_INTEREST,
                                    Statistics::PacketType::SENT_ADJ_LSA_DATA);
@@ -252,7 +256,7 @@
 
   // Receive Name LSA Interest
   receiveInterestAndCheckSentStats(interestPrefix,
-                                   NameLsa::TYPE_STRING,
+                                   std::to_string(Lsa::Type::NAME),
                                    seqNo,
                                    Statistics::PacketType::RCV_NAME_LSA_INTEREST,
                                    Statistics::PacketType::SENT_NAME_LSA_DATA);
@@ -264,7 +268,7 @@
 
   // Receive Adjacency LSA Interest
   receiveInterestAndCheckSentStats(interestPrefix,
-                                   CoordinateLsa::TYPE_STRING,
+                                   std::to_string(Lsa::Type::COORDINATE),
                                    seqNo,
                                    Statistics::PacketType::RCV_COORD_LSA_INTEREST,
                                    Statistics::PacketType::SENT_COORD_LSA_DATA);
@@ -287,7 +291,7 @@
   ndn::time::system_clock::TimePoint MAX_TIME = ndn::time::system_clock::TimePoint::max();
 
   // adjacency lsa
-  ndn::Name adjInterest("/ndn/NLSR/LSA/cs/%C1.Router/router1/adjacency/");
+  ndn::Name adjInterest("/ndn/NLSR/LSA/cs/%C1.Router/router1/ADJACENCY/");
   adjInterest.appendNumber(seqNo);
   AdjLsa aLsa(routerName, seqNo, MAX_TIME, 1, nlsr.getAdjacencyList());
   lsdb.installAdjLsa(aLsa);
@@ -298,7 +302,7 @@
   BOOST_CHECK_EQUAL(collector.getStatistics().get(Statistics::PacketType::RCV_ADJ_LSA_DATA), 1);
 
   // coordinate lsa
-  ndn::Name coordInterest("/ndn/NLSR/LSA/cs/%C1.Router/router1/coordinate/");
+  ndn::Name coordInterest("/ndn/NLSR/LSA/cs/%C1.Router/router1/COORDINATE/");
   coordInterest.appendNumber(seqNo);
   std::vector<double> angles = {20.0, 30.0};
   CoordinateLsa cLsa(routerName, seqNo, MAX_TIME, 2.5, angles);
@@ -310,7 +314,7 @@
   BOOST_CHECK_EQUAL(collector.getStatistics().get(Statistics::PacketType::RCV_COORD_LSA_DATA), 1);
 
   // name lsa
-  ndn::Name interestName("/ndn/NLSR/LSA/cs/%C1.Router/router1/name/");
+  ndn::Name interestName("/ndn/NLSR/LSA/cs/%C1.Router/router1/NAME/");
   interestName.appendNumber(seqNo);
   NameLsa nLsa(routerName, seqNo, MAX_TIME, nlsr.getNamePrefixList());
   lsdb.installNameLsa(nLsa);
diff --git a/tests/test-sync-logic-handler.cpp b/tests/test-sync-logic-handler.cpp
index bb6a6db..e660a5d 100644
--- a/tests/test-sync-logic-handler.cpp
+++ b/tests/test-sync-logic-handler.cpp
@@ -23,6 +23,7 @@
 #include "test-common.hpp"
 #include "common.hpp"
 #include "nlsr.hpp"
+#include "lsa.hpp"
 #include "logger.hpp"
 
 #include <ndn-cxx/util/dummy-client-face.hpp>
@@ -38,7 +39,7 @@
   SyncLogicFixture()
     : face(std::make_shared<ndn::util::DummyClientFace>())
     , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
-    , testIsLsaNew([] (const ndn::Name& name, const std::string& lsaType,
+    , testIsLsaNew([] (const ndn::Name& name, const Lsa::Type& lsaType,
                        const uint64_t sequenceNumber) {
                      return true;
                    })
@@ -79,14 +80,14 @@
   std::shared_ptr<ndn::util::DummyClientFace> face;
   Nlsr nlsr;
   ConfParameter conf;
-  IsLsaNew testIsLsaNew;
+  SyncLogicHandler::IsLsaNew testIsLsaNew;
 
   const std::string CONFIG_NETWORK;
   const std::string CONFIG_SITE;
   const std::string CONFIG_ROUTER_NAME;
   const std::string OTHER_ROUTER_NAME;
-  const std::vector<std::string> lsaTypes = {NameLsa::TYPE_STRING, AdjLsa::TYPE_STRING,
-                                             CoordinateLsa::TYPE_STRING};
+  const std::vector<Lsa::Type> lsaTypes = {Lsa::Type::NAME, Lsa::Type::ADJACENCY,
+                                             Lsa::Type::COORDINATE};
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestSyncLogicHandler, SyncLogicFixture)
@@ -100,13 +101,13 @@
   SyncLogicHandler sync{std::ref(*face), testIsLsaNew, conf};
   sync.createSyncSocket(conf.getChronosyncPrefix());
 
-  std::vector<std::string> lsaTypes = {NameLsa::TYPE_STRING, AdjLsa::TYPE_STRING};
+  std::vector<Lsa::Type> lsaTypes = {Lsa::Type::NAME, Lsa::Type::ADJACENCY};
 
   uint64_t syncSeqNo = 1;
 
-  for (const std::string& lsaType : lsaTypes) {
+  for (const Lsa::Type& lsaType : lsaTypes) {
     std::string updateName = conf.getLsaPrefix().toUri() + CONFIG_SITE
-      + OTHER_ROUTER_NAME + lsaType;
+      + OTHER_ROUTER_NAME + std::to_string(lsaType);
 
     // Actual testing done here -- signal function callback
     ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
@@ -131,11 +132,11 @@
   sync.createSyncSocket(conf.getChronosyncPrefix());
 
   uint64_t syncSeqNo = 1;
-  std::vector<std::string> lsaTypes = {NameLsa::TYPE_STRING, CoordinateLsa::TYPE_STRING};
+  std::vector<Lsa::Type> lsaTypes = {Lsa::Type::NAME, Lsa::Type::COORDINATE};
 
-  for (const std::string& lsaType : lsaTypes) {
+  for (const Lsa::Type& lsaType : lsaTypes) {
     std::string updateName = conf.getLsaPrefix().toUri() + CONFIG_SITE
-      + OTHER_ROUTER_NAME + lsaType;
+      + OTHER_ROUTER_NAME + std::to_string(lsaType);
 
     ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
       [& ,this] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
@@ -158,11 +159,11 @@
   SyncLogicHandler sync{std::ref(*face), testIsLsaNew, conf};
   sync.createSyncSocket(conf.getChronosyncPrefix());
 
-  for (const std::string& lsaType : lsaTypes) {
+  for (const Lsa::Type& lsaType : lsaTypes) {
     uint64_t syncSeqNo = 1;
 
     std::string updateName = conf.getLsaPrefix().toUri() + CONFIG_SITE
-      + OTHER_ROUTER_NAME + lsaType;
+      + OTHER_ROUTER_NAME + std::to_string(lsaType);
 
     ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
       [& ,this] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
@@ -185,11 +186,11 @@
   SyncLogicHandler sync{std::ref(*face), testIsLsaNew, conf};
   sync.createSyncSocket(conf.getChronosyncPrefix());
 
-  for (const std::string& lsaType : lsaTypes) {
+  for (const Lsa::Type& lsaType : lsaTypes) {
     // To ensure that we get correctly-separated components, create
     // and modify a Name to hand off.
     ndn::Name updateName = ndn::Name{conf.getLsaPrefix()};
-    updateName.append(CONFIG_SITE).append(CONFIG_ROUTER_NAME).append(lsaType);
+    updateName.append(CONFIG_SITE).append(CONFIG_ROUTER_NAME).append(std::to_string(lsaType));
 
     ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
       [& ,this] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
@@ -211,9 +212,9 @@
   SyncLogicHandler sync{std::ref(*face), testIsLsaNew, conf};
   sync.createSyncSocket(conf.getChronosyncPrefix());
 
-  for (const std::string& lsaType : lsaTypes) {
+  for (const Lsa::Type& lsaType : lsaTypes) {
     ndn::Name updateName{CONFIG_SITE};
-    updateName.append(CONFIG_ROUTER_NAME).append(lsaType);
+    updateName.append(CONFIG_ROUTER_NAME).append(std::to_string(lsaType));
 
     ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
       [& ,this] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
@@ -230,7 +231,7 @@
  */
 BOOST_AUTO_TEST_CASE(LsaNotNew)
 {
-  auto testLsaAlwaysFalse = [] (const ndn::Name& routerName, const std::string& lsaType,
+  auto testLsaAlwaysFalse = [] (const ndn::Name& routerName, const Lsa::Type& lsaType,
                            const uint64_t& sequenceNumber) {
     return false;
   };
@@ -244,7 +245,8 @@
       });
 
   std::string updateName = nlsr.getConfParameter().getLsaPrefix().toUri() +
-                           CONFIG_SITE + "/%C1.Router/other-router/" + NameLsa::TYPE_STRING;
+                           CONFIG_SITE + "/%C1.Router/other-router/" +
+                           std::to_string(Lsa::Type::NAME);
 
   receiveUpdate(updateName, sequenceNumber, sync);
 }
@@ -265,32 +267,32 @@
   sync.buildUpdatePrefix();
 
   BOOST_CHECK_EQUAL(sync.m_nameLsaUserPrefix,
-                    ndn::Name(expectedPrefix).append(NameLsa::TYPE_STRING));
+                    ndn::Name(expectedPrefix).append(std::to_string(Lsa::Type::NAME)));
   BOOST_CHECK_EQUAL(sync.m_adjLsaUserPrefix,
-                    ndn::Name(expectedPrefix).append(AdjLsa::TYPE_STRING));
+                    ndn::Name(expectedPrefix).append(std::to_string(Lsa::Type::ADJACENCY)));
   BOOST_CHECK_EQUAL(sync.m_coorLsaUserPrefix,
-                    ndn::Name(expectedPrefix).append(CoordinateLsa::TYPE_STRING));
+                    ndn::Name(expectedPrefix).append(std::to_string(Lsa::Type::COORDINATE)));
 }
 
 /* Tests that SyncLogicHandler's socket will be created when
    Nlsr::initialize is called, preventing use of sync before the
    socket is created.
 
-   NB: This test is as much an Nlsr class test as a SyncLogicHandler
-   class test, but it rides the line and ends up here.
+   NB: This test is as much an Nlsr class test as a
+   SyncLogicHandler class test, but it rides the line and ends up here.
  */
 BOOST_AUTO_TEST_CASE(CreateSyncSocketOnInitialization) // Bug #2649
 {
   nlsr.initialize();
 
   // Make sure an adjacency LSA has not been built yet
-  ndn::Name key = ndn::Name(nlsr.getConfParameter().getRouterPrefix()).append(AdjLsa::TYPE_STRING);
+  ndn::Name key = ndn::Name(nlsr.getConfParameter().getRouterPrefix()).append(std::to_string(Lsa::Type::ADJACENCY));
   AdjLsa* lsa = nlsr.getLsdb().findAdjLsa(key);
   BOOST_REQUIRE(lsa == nullptr);
 
   // Publish a routing update before an Adjacency LSA is built
   BOOST_CHECK_NO_THROW(nlsr.getLsdb().getSyncLogicHandler()
-                       .publishRoutingUpdate(AdjLsa::TYPE_STRING, 0));
+                       .publishRoutingUpdate(Lsa::Type::ADJACENCY, 0));
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/tlv/test-lsa-info.cpp b/tests/tlv/test-lsa-info.cpp
index 2997231..a179e2c 100644
--- a/tests/tlv/test-lsa-info.cpp
+++ b/tests/tlv/test-lsa-info.cpp
@@ -24,7 +24,7 @@
 #include "../boost-test.hpp"
 
 namespace nlsr {
-namespace tlv  {
+namespace tlv {
 namespace test {
 
 BOOST_AUTO_TEST_SUITE(TlvTestLsaInfo)
@@ -125,7 +125,7 @@
 
 BOOST_AUTO_TEST_CASE(LsaInfoMake)
 {
-  Lsa lsa("lsa-type");
+  Lsa lsa;
   lsa.setOrigRouter("/test/lsa/info/tlv");
   lsa.setLsSeqNo(128);
   lsa.setExpirationTimePoint(ndn::time::system_clock::now());
diff --git a/tests/update/test-nfd-rib-command-processor.cpp b/tests/update/test-nfd-rib-command-processor.cpp
index 20856fe..53c77a1 100644
--- a/tests/update/test-nfd-rib-command-processor.cpp
+++ b/tests/update/test-nfd-rib-command-processor.cpp
@@ -75,7 +75,7 @@
     // no longer does face->put(*data) in publishData.
     // Instead it does it in onInterest
     ndn::Name lsaInterestName("/localhop/ndn/NLSR/LSA");
-    lsaInterestName.append(NameLsa::TYPE_STRING);
+    lsaInterestName.append(std::to_string(Lsa::Type::NAME));
 
     // The part after LSA is Chronosync getSession
     lsaInterestName.append(sessionTime);
diff --git a/tests/update/test-prefix-update-processor.cpp b/tests/update/test-prefix-update-processor.cpp
index 8fb4c27..62ec8f6 100644
--- a/tests/update/test-prefix-update-processor.cpp
+++ b/tests/update/test-prefix-update-processor.cpp
@@ -163,7 +163,7 @@
     // no longer does face->put(*data) in publishData.
     // Instead it does it in onInterest
     ndn::Name lsaInterestName("/localhop/ndn/NLSR/LSA");
-    lsaInterestName.append(NameLsa::TYPE_STRING);
+    lsaInterestName.append(std::to_string(Lsa::Type::NAME));
 
     // The part after LSA is Chronosync getSession
     lsaInterestName.append(sessionTime);
