diff --git a/src/lsa.cpp b/src/lsa.cpp
index 8830951..db516b7 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -53,12 +53,12 @@
   return key;
 }
 
-NameLsa::NameLsa(const ndn::Name& origR, const string& lst, uint32_t lsn,
+NameLsa::NameLsa(const ndn::Name& origR, uint32_t lsn,
                  const ndn::time::system_clock::TimePoint& lt,
                  NamePrefixList& npl)
+  : Lsa(NameLsa::TYPE_STRING)
 {
   m_origRouter = origR;
-  m_lsType = lst;
   m_lsSeqNo = lsn;
   m_expirationTimePoint = lt;
   std::list<ndn::Name>& nl = npl.getNameList();
@@ -97,12 +97,16 @@
     return false;
   }
   try {
-    m_lsType = *tok_iter++;
+    if (*tok_iter++ != NameLsa::TYPE_STRING) {
+      return false;
+    }
+
     m_lsSeqNo = boost::lexical_cast<uint32_t>(*tok_iter++);
     m_expirationTimePoint = ndn::time::fromIsoString(*tok_iter++);
     numName = boost::lexical_cast<uint32_t>(*tok_iter++);
   }
   catch (std::exception& e) {
+    _LOG_ERROR(e.what());
     return false;
   }
   for (uint32_t i = 0; i < numName; i++) {
@@ -130,13 +134,12 @@
   _LOG_DEBUG("name_lsa_end");
 }
 
-CoordinateLsa::CoordinateLsa(const ndn::Name& origR, const string lst,
-                             uint32_t lsn,
+CoordinateLsa::CoordinateLsa(const ndn::Name& origR, uint32_t lsn,
                              const ndn::time::system_clock::TimePoint& lt,
                              double r, double theta)
+  : Lsa(CoordinateLsa::TYPE_STRING)
 {
   m_origRouter = origR;
-  m_lsType = lst;
   m_lsSeqNo = lsn;
   m_expirationTimePoint = lt;
   m_corRad = r;
@@ -186,13 +189,17 @@
     return false;
   }
   try {
-    m_lsType   = *tok_iter++;
+    if (*tok_iter++ != CoordinateLsa::TYPE_STRING) {
+      return false;
+    }
+
     m_lsSeqNo  = boost::lexical_cast<uint32_t>(*tok_iter++);
     m_expirationTimePoint = ndn::time::fromIsoString(*tok_iter++);
     m_corRad   = boost::lexical_cast<double>(*tok_iter++);
     m_corTheta = boost::lexical_cast<double>(*tok_iter++);
   }
   catch (std::exception& e) {
+    _LOG_ERROR(e.what());
     return false;
   }
   return true;
@@ -210,12 +217,12 @@
   _LOG_DEBUG("    Hyperbolic Theta: " << m_corTheta);
 }
 
-AdjLsa::AdjLsa(const ndn::Name& origR, const string& lst, uint32_t lsn,
+AdjLsa::AdjLsa(const ndn::Name& origR, uint32_t lsn,
                const ndn::time::system_clock::TimePoint& lt,
                uint32_t nl , AdjacencyList& adl)
+  : Lsa(AdjLsa::TYPE_STRING)
 {
   m_origRouter = origR;
-  m_lsType = lst;
   m_lsSeqNo = lsn;
   m_expirationTimePoint = lt;
   m_noLink = nl;
@@ -276,12 +283,16 @@
     return false;
   }
   try {
-    m_lsType   = *tok_iter++;
+    if (*tok_iter++ != AdjLsa::TYPE_STRING) {
+      return false;
+    }
+
     m_lsSeqNo  = boost::lexical_cast<uint32_t>(*tok_iter++);
     m_expirationTimePoint = ndn::time::fromIsoString(*tok_iter++);
     numLink    = boost::lexical_cast<uint32_t>(*tok_iter++);
   }
   catch (std::exception& e) {
+    _LOG_ERROR(e.what());
     return false;
   }
   for (uint32_t i = 0; i < numLink; i++) {
@@ -293,6 +304,7 @@
       addAdjacent(adjacent);
     }
     catch (std::exception& e) {
+      _LOG_ERROR(e.what());
       return false;
     }
   }
diff --git a/src/lsa.hpp b/src/lsa.hpp
index 544f01d..c797815 100644
--- a/src/lsa.hpp
+++ b/src/lsa.hpp
@@ -35,21 +35,15 @@
 class Lsa
 {
 public:
-  Lsa()
+  Lsa(const std::string& lsaType)
     : m_origRouter()
+    , m_lsType(lsaType)
     , m_lsSeqNo()
     , m_expirationTimePoint()
     , m_expiringEventId()
   {
   }
 
-
-  void
-  setLsType(const std::string& lst)
-  {
-    m_lsType = lst;
-  }
-
   const std::string&
   getLsType() const
   {
@@ -106,7 +100,7 @@
 
 protected:
   ndn::Name m_origRouter;
-  std::string m_lsType;
+  const std::string m_lsType;
   uint32_t m_lsSeqNo;
   ndn::time::system_clock::TimePoint m_expirationTimePoint;
   ndn::EventId m_expiringEventId;
@@ -116,13 +110,12 @@
 {
 public:
   NameLsa()
-    : Lsa()
+    : Lsa(NameLsa::TYPE_STRING)
     , m_npl()
   {
-    setLsType(NameLsa::TYPE_STRING);
   }
 
-  NameLsa(const ndn::Name& origR, const std::string& lst, uint32_t lsn,
+  NameLsa(const ndn::Name& origR, uint32_t lsn,
           const ndn::time::system_clock::TimePoint& lt,
           NamePrefixList& npl);
 
@@ -168,13 +161,12 @@
   typedef AdjacencyList::const_iterator const_iterator;
 
   AdjLsa()
-    : Lsa()
+    : Lsa(AdjLsa::TYPE_STRING)
     , m_adl()
   {
-    setLsType(AdjLsa::TYPE_STRING);
   }
 
-  AdjLsa(const ndn::Name& origR, const std::string& lst, uint32_t lsn,
+  AdjLsa(const ndn::Name& origR, uint32_t lsn,
          const ndn::time::system_clock::TimePoint& lt,
          uint32_t nl , AdjacencyList& adl);
 
@@ -242,14 +234,13 @@
 {
 public:
   CoordinateLsa()
-    : Lsa()
+    : Lsa(CoordinateLsa::TYPE_STRING)
     , m_corRad(0)
     , m_corTheta(0)
   {
-    setLsType(CoordinateLsa::TYPE_STRING);
   }
 
-  CoordinateLsa(const ndn::Name& origR, const std::string lst, uint32_t lsn,
+  CoordinateLsa(const ndn::Name& origR, uint32_t lsn,
                 const ndn::time::system_clock::TimePoint& lt,
                 double r, double theta);
 
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index c0fb765..d4b7193 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -55,7 +55,6 @@
 Lsdb::buildAndInstallOwnNameLsa()
 {
   NameLsa nameLsa(m_nlsr.getConfParameter().getRouterPrefix(),
-                  NameLsa::TYPE_STRING,
                   m_nlsr.getSequencingManager().getNameLsaSeq() + 1,
                   getLsaExpirationTimePoint(),
                   m_nlsr.getNamePrefixList());
@@ -267,7 +266,6 @@
 Lsdb::buildAndInstallOwnCoordinateLsa()
 {
   CoordinateLsa corLsa(m_nlsr.getConfParameter().getRouterPrefix(),
-                       CoordinateLsa::TYPE_STRING,
                        m_nlsr.getSequencingManager().getCorLsaSeq() + 1,
                        getLsaExpirationTimePoint(),
                        m_nlsr.getConfParameter().getCorR(),
@@ -589,7 +587,6 @@
 Lsdb::buildAndInstallOwnAdjLsa()
 {
   AdjLsa adjLsa(m_nlsr.getConfParameter().getRouterPrefix(),
-                AdjLsa::TYPE_STRING,
                 m_nlsr.getSequencingManager().getAdjLsaSeq() + 1,
                 getLsaExpirationTimePoint(),
                 m_nlsr.getAdjacencyList().getNumOfActiveNeighbor(),
diff --git a/tests/publisher/publisher-fixture.hpp b/tests/publisher/publisher-fixture.hpp
index df299e3..6b6e698 100644
--- a/tests/publisher/publisher-fixture.hpp
+++ b/tests/publisher/publisher-fixture.hpp
@@ -83,7 +83,7 @@
   CoordinateLsa
   createCoordinateLsa(const std::string& origin, double radius, double angle)
   {
-    CoordinateLsa lsa(origin, CoordinateLsa::TYPE_STRING, 1, ndn::time::system_clock::now(),
+    CoordinateLsa lsa(origin, 1, ndn::time::system_clock::now(),
                       radius, angle);
 
     return lsa;
diff --git a/tests/test-hyperbolic-calculator.cpp b/tests/test-hyperbolic-calculator.cpp
index 9bf354c..0d569f5 100644
--- a/tests/test-hyperbolic-calculator.cpp
+++ b/tests/test-hyperbolic-calculator.cpp
@@ -67,10 +67,10 @@
     adjacencies.insert(b);
     adjacencies.insert(c);
 
-    AdjLsa adjA(a.getName(), AdjLsa::TYPE_STRING, 1, MAX_TIME, 2, adjacencies);
+    AdjLsa adjA(a.getName(), 1, MAX_TIME, 2, adjacencies);
     lsdb.installAdjLsa(adjA);
 
-    CoordinateLsa coordA(adjA.getOrigRouter(), CoordinateLsa::TYPE_STRING, 1, MAX_TIME, 16.23, 2.97);
+    CoordinateLsa coordA(adjA.getOrigRouter(), 1, MAX_TIME, 16.23, 2.97);
     lsdb.installCoordinateLsa(coordA);
 
     // Router B
@@ -81,10 +81,10 @@
     adjacencyListB.insert(a);
     adjacencyListB.insert(c);
 
-    AdjLsa adjB(b.getName(), AdjLsa::TYPE_STRING, 1, MAX_TIME, 2, adjacencyListB);
+    AdjLsa adjB(b.getName(), 1, MAX_TIME, 2, adjacencyListB);
     lsdb.installAdjLsa(adjB);
 
-    CoordinateLsa coordB(adjB.getOrigRouter(), CoordinateLsa::TYPE_STRING, 1, MAX_TIME, 16.59, 3.0);
+    CoordinateLsa coordB(adjB.getOrigRouter(), 1, MAX_TIME, 16.59, 3.0);
     lsdb.installCoordinateLsa(coordB);
 
     // Router C
@@ -95,10 +95,10 @@
     adjacencyListC.insert(a);
     adjacencyListC.insert(b);
 
-    AdjLsa adjC(c.getName(), AdjLsa::TYPE_STRING, 1, MAX_TIME, 2, adjacencyListC);
+    AdjLsa adjC(c.getName(), 1, MAX_TIME, 2, adjacencyListC);
     lsdb.installAdjLsa(adjC);
 
-    CoordinateLsa coordC(adjC.getOrigRouter(), CoordinateLsa::TYPE_STRING, 1, MAX_TIME, 14.11, 2.99);
+    CoordinateLsa coordC(adjC.getOrigRouter(), 1, MAX_TIME, 14.11, 2.99);
     lsdb.installCoordinateLsa(coordC);
 
     map.createFromAdjLsdb(nlsr);
diff --git a/tests/test-link-state-calculator.cpp b/tests/test-link-state-calculator.cpp
index f50001e..7ed38e5 100644
--- a/tests/test-link-state-calculator.cpp
+++ b/tests/test-link-state-calculator.cpp
@@ -72,7 +72,7 @@
     adjacencyListA.insert(b);
     adjacencyListA.insert(c);
 
-    AdjLsa adjA(a.getName(), AdjLsa::TYPE_STRING, 1, MAX_TIME, 2, adjacencyListA);
+    AdjLsa adjA(a.getName(), 1, MAX_TIME, 2, adjacencyListA);
     lsdb.installAdjLsa(adjA);
 
     // Router B
@@ -83,7 +83,7 @@
     adjacencyListB.insert(a);
     adjacencyListB.insert(c);
 
-    AdjLsa adjB(b.getName(), AdjLsa::TYPE_STRING, 1, MAX_TIME, 2, adjacencyListB);
+    AdjLsa adjB(b.getName(), 1, MAX_TIME, 2, adjacencyListB);
     lsdb.installAdjLsa(adjB);
 
     // Router C
@@ -94,7 +94,7 @@
     adjacencyListC.insert(a);
     adjacencyListC.insert(b);
 
-    AdjLsa adjC(c.getName(), AdjLsa::TYPE_STRING, 1, MAX_TIME, 2, adjacencyListC);
+    AdjLsa adjC(c.getName(), 1, MAX_TIME, 2, adjacencyListC);
     lsdb.installAdjLsa(adjC);
 
     map.createFromAdjLsdb(nlsr);
diff --git a/tests/test-lsa.cpp b/tests/test-lsa.cpp
index 0d8c942..562014c 100644
--- a/tests/test-lsa.cpp
+++ b/tests/test-lsa.cpp
@@ -44,9 +44,10 @@
   npl1.insert(s1);
   npl1.insert(s2);
   ndn::time::system_clock::TimePoint testTimePoint =  ndn::time::system_clock::now();
-//lsType is 1 for NameLsa, 3rd arg is seqNo. which will be a random number I just put in 12.
-  NameLsa nlsa1("router1", NameLsa::TYPE_STRING, 12, testTimePoint, npl1);
-  NameLsa nlsa2("router2", NameLsa::TYPE_STRING, 12, testTimePoint, npl1);
+
+  //3rd arg is seqNo. which will be a random number I just put in 12.
+  NameLsa nlsa1("router1", 12, testTimePoint, npl1);
+  NameLsa nlsa2("router2", 12, testTimePoint, npl1);
 
   BOOST_CHECK_EQUAL(nlsa1.getLsType(), NameLsa::TYPE_STRING);
 
@@ -68,7 +69,7 @@
   activeAdjacency.setStatus(Adjacent::STATUS_ACTIVE);
   activeAdjacencies.insert(activeAdjacency);
 
-  AdjLsa alsa1(routerName, AdjLsa::TYPE_STRING, seqNo, testTimePoint,
+  AdjLsa alsa1(routerName, seqNo, testTimePoint,
                activeAdjacencies.getSize(), activeAdjacencies);
   BOOST_CHECK_EQUAL(alsa1.getAdl().getSize(), 1);
   BOOST_CHECK_EQUAL(alsa1.getLsType(), AdjLsa::TYPE_STRING);
@@ -83,7 +84,7 @@
   inactiveAdjacency.setStatus(Adjacent::STATUS_INACTIVE);
   inactiveAdjacencies.insert(inactiveAdjacency);
 
-  AdjLsa alsa2(routerName, AdjLsa::TYPE_STRING, seqNo, testTimePoint,
+  AdjLsa alsa2(routerName, seqNo, testTimePoint,
                inactiveAdjacencies.getSize(), inactiveAdjacencies);
   BOOST_CHECK_EQUAL(alsa2.getAdl().getSize(), 0);
 
@@ -91,7 +92,7 @@
   BOOST_CHECK_EQUAL(alsa1.isEqualContent(alsa2), false);
 
   // Create a duplicate of alsa1 which should have equal content
-  AdjLsa alsa3(routerName, AdjLsa::TYPE_STRING, seqNo, testTimePoint,
+  AdjLsa alsa3(routerName, seqNo, testTimePoint,
                activeAdjacencies.getSize(), activeAdjacencies);
   BOOST_CHECK(alsa1.isEqualContent(alsa3));
 }
@@ -99,9 +100,8 @@
 BOOST_AUTO_TEST_CASE(CoordinateLsaConstructorAndGetters)
 {
   ndn::time::system_clock::TimePoint testTimePoint =  ndn::time::system_clock::now();
-//For CoordinateLsa, lsType is 3.
-  CoordinateLsa clsa1("router1", CoordinateLsa::TYPE_STRING, 12, testTimePoint, 2.5, 30.0);
-  CoordinateLsa clsa2("router1", CoordinateLsa::TYPE_STRING, 12, testTimePoint, 2.5, 30.0);
+  CoordinateLsa clsa1("router1", 12, testTimePoint, 2.5, 30.0);
+  CoordinateLsa clsa2("router1", 12, testTimePoint, 2.5, 30.0);
 
   BOOST_CHECK_CLOSE(clsa1.getCorRadius(), 2.5, 0.0001);
   BOOST_CHECK_CLOSE(clsa1.getCorTheta(), 30.0, 0.0001);
@@ -130,7 +130,7 @@
 
   const std::string TEST_TIME_POINT_STRING = ss.str();
 
-  AdjLsa lsa("router1", AdjLsa::TYPE_STRING, 12, testTimePoint, 1, adjList);
+  AdjLsa lsa("router1", 12, testTimePoint, adjList.getSize(), adjList);
 
   std::string EXPECTED_OUTPUT =
     "Adj Lsa:\n"
@@ -155,6 +155,59 @@
   BOOST_CHECK_EQUAL(os.str(), EXPECTED_OUTPUT);
 }
 
+BOOST_AUTO_TEST_CASE(TestInitializeFromContent)
+{
+  //Adj LSA
+  Adjacent adj1("adjacent1");
+  Adjacent adj2("adjacent2");
+
+  adj1.setStatus(Adjacent::STATUS_ACTIVE);
+  adj2.setStatus(Adjacent::STATUS_ACTIVE);
+
+  //If we don't do this the test will fail
+  //Adjacent has default cost of 10 but no default
+  //connecting face URI, so initializeFromContent fails
+  adj1.setConnectingFaceUri("10.0.0.1");
+  adj2.setConnectingFaceUri("10.0.0.2");
+
+  AdjacencyList adjList;
+  adjList.insert(adj1);
+  adjList.insert(adj2);
+
+  ndn::time::system_clock::TimePoint testTimePoint = ndn::time::system_clock::now();
+
+  AdjLsa adjlsa1("router1", 1, testTimePoint, adjList.getSize(), adjList);
+  AdjLsa adjlsa2;
+
+  BOOST_CHECK(adjlsa2.initializeFromContent(adjlsa1.getData()));
+
+  BOOST_CHECK(adjlsa1.isEqualContent(adjlsa2));
+
+  //Name LSA
+  NamePrefixList npl1;
+
+  std::string s1 = "name1";
+  std::string s2 = "name2";
+
+  npl1.insert(s1);
+  npl1.insert(s2);
+
+  NameLsa nlsa1("router1", 1, testTimePoint, npl1);
+  NameLsa nlsa2;
+
+  BOOST_CHECK(nlsa2.initializeFromContent(nlsa1.getData()));
+
+  BOOST_CHECK_EQUAL(nlsa1.getData(), nlsa2.getData());
+
+  //Coordinate LSA
+  CoordinateLsa clsa1("router1", 12, testTimePoint, 2.5, 30.0);
+  CoordinateLsa clsa2;
+
+  BOOST_CHECK(clsa2.initializeFromContent(clsa1.getData()));
+
+  BOOST_CHECK_EQUAL(clsa1.getData(), clsa2.getData());
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace test
diff --git a/tests/test-lsdb.cpp b/tests/test-lsdb.cpp
index c44b4a7..7111620 100644
--- a/tests/test-lsdb.cpp
+++ b/tests/test-lsdb.cpp
@@ -171,7 +171,7 @@
   //For NameLsa lsType is name.
   //12 is seqNo, randomly generated.
   //1800 is the default life time.
-  NameLsa nlsa1(ndn::Name("/router1/1"), NameLsa::TYPE_STRING, 12, testTimePoint, npl1);
+  NameLsa nlsa1(ndn::Name("/router1/1"), 12, testTimePoint, npl1);
 
   Lsdb lsdb1(nlsr, g_scheduler, nlsr.getSyncLogicHandler());
 
@@ -198,7 +198,7 @@
   std::string otherRouter("/ndn/site/%C1.router/other-router");
   ndn::time::system_clock::TimePoint MAX_TIME = ndn::time::system_clock::TimePoint::max();
 
-  NameLsa lsa(otherRouter, NameLsa::TYPE_STRING, 1, MAX_TIME, prefixes);
+  NameLsa lsa(otherRouter, 1, MAX_TIME, prefixes);
   lsdb.installNameLsa(lsa);
 
   BOOST_REQUIRE_EQUAL(lsdb.doesLsaExist(otherRouter + "/name", NameLsa::TYPE_STRING), true);
@@ -210,7 +210,7 @@
   ndn::Name name3("/ndn/name3");
   prefixes.insert(name3);
 
-  NameLsa addLsa(otherRouter, NameLsa::TYPE_STRING, 2, MAX_TIME, prefixes);
+  NameLsa addLsa(otherRouter, 2, MAX_TIME, prefixes);
   lsdb.installNameLsa(addLsa);
 
   // Lsa should include name1, name2, and name3
@@ -219,7 +219,7 @@
   // Remove a prefix: name2
   prefixes.remove(name2);
 
-  NameLsa removeLsa(otherRouter, NameLsa::TYPE_STRING, 3, MAX_TIME, prefixes);
+  NameLsa removeLsa(otherRouter, 3, MAX_TIME, prefixes);
   lsdb.installNameLsa(removeLsa);
 
   // Lsa should include name1 and name3
@@ -229,7 +229,7 @@
   prefixes.insert(name2);
   prefixes.remove(name3);
 
-  NameLsa addAndRemoveLsa(otherRouter, NameLsa::TYPE_STRING, 4, MAX_TIME, prefixes);
+  NameLsa addAndRemoveLsa(otherRouter, 4, MAX_TIME, prefixes);
   lsdb.installNameLsa(addAndRemoveLsa);
 
   // Lsa should include name1 and name2
@@ -243,7 +243,7 @@
   newPrefixes.insert(name4);
   newPrefixes.insert(name5);
 
-  NameLsa newLsa(otherRouter, NameLsa::TYPE_STRING, 5, MAX_TIME, newPrefixes);
+  NameLsa newLsa(otherRouter, 5, MAX_TIME, newPrefixes);
   lsdb.installNameLsa(newLsa);
 
   // Lsa should include name4 and name5
diff --git a/tests/test-name-prefix-table.cpp b/tests/test-name-prefix-table.cpp
index 8392102..989db19 100644
--- a/tests/test-name-prefix-table.cpp
+++ b/tests/test-name-prefix-table.cpp
@@ -69,9 +69,7 @@
 
   // This router's Adjacency LSA
   nlsr.getAdjacencyList().insert(bupt);
-  AdjLsa thisRouterAdjLsa(thisRouter.getName(),
-                          AdjLsa::TYPE_STRING,
-                          1,
+  AdjLsa thisRouterAdjLsa(thisRouter.getName(), 1,
                           ndn::time::system_clock::now() + ndn::time::seconds::max(),
                           2,
                           nlsr.getAdjacencyList());
@@ -81,9 +79,7 @@
   // BUPT Adjacency LSA
   AdjacencyList buptAdjacencies;
   buptAdjacencies.insert(thisRouter);
-  AdjLsa buptAdjLsa(buptRouterName,
-                    AdjLsa::TYPE_STRING,
-                    1,
+  AdjLsa buptAdjLsa(buptRouterName, 1,
                     ndn::time::system_clock::now() + ndn::time::seconds(5),
                     0 , buptAdjacencies);
 
@@ -95,10 +91,7 @@
   NamePrefixList buptNames;
   buptNames.insert(buptAdvertisedName);
 
-  NameLsa buptNameLsa(buptRouterName,
-                      NameLsa::TYPE_STRING,
-                      1,
-                      ndn::time::system_clock::now(),
+  NameLsa buptNameLsa(buptRouterName, 1, ndn::time::system_clock::now(),
                       buptNames);
 
   lsdb.installNameLsa(buptNameLsa);
@@ -111,8 +104,7 @@
   BOOST_REQUIRE(it == npt.end());
 
   // Install new name LSA
-  NameLsa buptNewNameLsa(buptRouterName, NameLsa::TYPE_STRING,
-                         12,
+  NameLsa buptNewNameLsa(buptRouterName, 12,
                          ndn::time::system_clock::now() + ndn::time::seconds(3600),
                          buptNames);
 
@@ -121,8 +113,7 @@
   this->advanceClocks(ndn::time::seconds(1));
 
   // Install new adjacency LSA
-  AdjLsa buptNewAdjLsa(buptRouterName, AdjLsa::TYPE_STRING,
-                       12,
+  AdjLsa buptNewAdjLsa(buptRouterName, 12,
                        ndn::time::system_clock::now() + ndn::time::seconds(3600),
                        0, buptAdjacencies);
   lsdb.installAdjLsa(buptNewAdjLsa);
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index d24e512..5ad6efd 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -144,15 +144,14 @@
   // This router
   Adjacent thisRouter(conf.getRouterPrefix(), "uri://faceB", 10, Adjacent::STATUS_ACTIVE, 0, 256);
 
-  AdjLsa ownAdjLsa(conf.getRouterPrefix(), AdjLsa::TYPE_STRING, 10, ndn::time::system_clock::now(),
-                   1, neighbors);
+  AdjLsa ownAdjLsa(conf.getRouterPrefix(), 10, ndn::time::system_clock::now(), 1, neighbors);
   lsdb.installAdjLsa(ownAdjLsa);
 
   // Router that will fail
   AdjacencyList failAdjacencies;
   failAdjacencies.insert(thisRouter);
 
-  AdjLsa failAdjLsa("/ndn/neighborA", AdjLsa::TYPE_STRING, 10,
+  AdjLsa failAdjLsa("/ndn/neighborA", 10,
                      ndn::time::system_clock::now() + ndn::time::seconds(3600), 1, failAdjacencies);
 
   lsdb.installAdjLsa(failAdjLsa);
@@ -161,7 +160,7 @@
   AdjacencyList otherAdjacencies;
   otherAdjacencies.insert(thisRouter);
 
-  AdjLsa otherAdjLsa("/ndn/neighborB", AdjLsa::TYPE_STRING, 10,
+  AdjLsa otherAdjLsa("/ndn/neighborB", 10,
                      ndn::time::system_clock::now() + ndn::time::seconds(3600), 1, otherAdjacencies);
 
   lsdb.installAdjLsa(otherAdjLsa);
@@ -254,7 +253,7 @@
   ndn::Name nameToAdvertise("/ndn/neighborB/name");
   nameList.insert(nameToAdvertise);
 
-  NameLsa nameLsa("/ndn/neighborB", "name", 25, ndn::time::system_clock::now(), nameList);
+  NameLsa nameLsa("/ndn/neighborB", 25, ndn::time::system_clock::now(), nameList);
   lsdb.installNameLsa(nameLsa);
 
   nlsr.initialize();
@@ -266,15 +265,14 @@
   // This router
   Adjacent thisRouter(conf.getRouterPrefix(), "uri://faceB", 25, Adjacent::STATUS_ACTIVE, 0, 256);
 
-  AdjLsa ownAdjLsa(conf.getRouterPrefix(), AdjLsa::TYPE_STRING, 10, ndn::time::system_clock::now(),
-                   1, neighbors);
+  AdjLsa ownAdjLsa(conf.getRouterPrefix(), 10, ndn::time::system_clock::now(), 1, neighbors);
   lsdb.installAdjLsa(ownAdjLsa);
 
   // Other ACTIVE router
   AdjacencyList otherAdjacencies;
   otherAdjacencies.insert(thisRouter);
 
-  AdjLsa otherAdjLsa("/ndn/neighborB", AdjLsa::TYPE_STRING, 10,
+  AdjLsa otherAdjLsa("/ndn/neighborB", 10,
                      ndn::time::system_clock::now() + ndn::time::seconds(3600), 1, otherAdjacencies);
 
   lsdb.installAdjLsa(otherAdjLsa);
diff --git a/tests/test-sync-logic-handler.cpp b/tests/test-sync-logic-handler.cpp
index 56a990f..c2e092d 100644
--- a/tests/test-sync-logic-handler.cpp
+++ b/tests/test-sync-logic-handler.cpp
@@ -124,17 +124,17 @@
 
   // Install Name LSA
   NamePrefixList nameList;
-  NameLsa lsa(originRouter, NameLsa::TYPE_STRING, 999, ndn::time::system_clock::TimePoint::max(), nameList);
+  NameLsa lsa(originRouter, 999, ndn::time::system_clock::TimePoint::max(), nameList);
   lsdb.installNameLsa(lsa);
 
   // Install Adj LSA
   AdjacencyList adjList;
-  AdjLsa adjLsa(originRouter, AdjLsa::TYPE_STRING, 1000, ndn::time::system_clock::TimePoint::max(),
+  AdjLsa adjLsa(originRouter, 1000, ndn::time::system_clock::TimePoint::max(),
                 3 , adjList);
   lsdb.installAdjLsa(adjLsa);
 
   // Install Cor LSA
-  CoordinateLsa corLsa(originRouter, CoordinateLsa::TYPE_STRING, 1000, ndn::time::system_clock::TimePoint::max(),
+  CoordinateLsa corLsa(originRouter, 1000, ndn::time::system_clock::TimePoint::max(),
                        0,0);
   lsdb.installCoordinateLsa(corLsa);
 
diff --git a/tests/tlv/test-lsa-info.cpp b/tests/tlv/test-lsa-info.cpp
index 0e6d906..e8cd5db 100644
--- a/tests/tlv/test-lsa-info.cpp
+++ b/tests/tlv/test-lsa-info.cpp
@@ -125,7 +125,7 @@
 
 BOOST_AUTO_TEST_CASE(LsaInfoMake)
 {
-  Lsa lsa;
+  Lsa lsa("lsa-type");
   lsa.setOrigRouter("/test/lsa/info/tlv");
   lsa.setLsSeqNo(128);
   lsa.setExpirationTimePoint(ndn::time::system_clock::now());
