diff --git a/tests/publisher/publisher-fixture.hpp b/tests/publisher/publisher-fixture.hpp
index 477d7a7..eae6486 100644
--- a/tests/publisher/publisher-fixture.hpp
+++ b/tests/publisher/publisher-fixture.hpp
@@ -38,7 +38,7 @@
   PublisherFixture()
     : face(std::make_shared<ndn::util::DummyClientFace>())
     , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
-    , lsdb(nlsr, g_scheduler, nlsr.getSyncLogicHandler())
+    , lsdb(nlsr, g_scheduler)
   {
   }
 
diff --git a/tests/test-lsa-rule.cpp b/tests/test-lsa-rule.cpp
index d60d6a0..e7f6a69 100644
--- a/tests/test-lsa-rule.cpp
+++ b/tests/test-lsa-rule.cpp
@@ -174,7 +174,7 @@
   lsaInterestName.append(ndn::Name("name"));
 
   // This would be the sequence number of its own NameLsa
-  lsaInterestName.appendNumber(nlsr.getSequencingManager().getNameLsaSeq());
+  lsaInterestName.appendNumber(nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 
   // Append version, segmentNo
   lsaInterestName.appendNumber(1).appendNumber(1);
@@ -205,7 +205,7 @@
   lsaInterestName.append(ndn::Name("name"));
 
   // This would be the sequence number of its own NameLsa
-  lsaInterestName.appendNumber(nlsr.getSequencingManager().getNameLsaSeq());
+  lsaInterestName.appendNumber(nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 
   // Append version, segmentNo
   lsaInterestName.appendNumber(1).appendNumber(1);
diff --git a/tests/test-lsdb.cpp b/tests/test-lsdb.cpp
index 5d1613c..abd58d4 100644
--- a/tests/test-lsdb.cpp
+++ b/tests/test-lsdb.cpp
@@ -41,7 +41,7 @@
   LsdbFixture()
     : face(std::make_shared<ndn::util::DummyClientFace>(g_ioService))
     , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
-    , sync(*face, nlsr.getLsdb(), nlsr.getConfParameter(), nlsr.getSequencingManager())
+    , sync(*face, nlsr.getLsdb(), nlsr.getConfParameter())
     , lsdb(nlsr.getLsdb())
     , conf(nlsr.getConfParameter())
     , REGISTER_COMMAND_PREFIX("/localhost/nfd/rib")
@@ -243,7 +243,7 @@
   //1800 is the default life time.
   NameLsa nlsa1(ndn::Name("/router1/1"), 12, testTimePoint, npl1);
 
-  Lsdb lsdb1(nlsr, g_scheduler, nlsr.getSyncLogicHandler());
+  Lsdb lsdb1(nlsr, g_scheduler);
 
   lsdb1.installNameLsa(nlsa1);
   lsdb1.writeNameLsdbLog();
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index 3553a43..3760289 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -190,7 +190,7 @@
   BOOST_REQUIRE(lsa != nullptr);
 
   uint32_t lastAdjLsaSeqNo = lsa->getLsSeqNo();
-  nlsr.getSequencingManager().setAdjLsaSeq(lastAdjLsaSeqNo);
+  nlsr.getLsdb().getSequencingManager().setAdjLsaSeq(lastAdjLsaSeqNo);
 
   // Make sure the routing table was calculated
   RoutingTableEntry* rtEntry = nlsr.getRoutingTable().findRoutingTableEntry(failNeighbor.getName());
diff --git a/tests/test-sequencing-manager.cpp b/tests/test-sequencing-manager.cpp
index 186e7df..e05597f 100644
--- a/tests/test-sequencing-manager.cpp
+++ b/tests/test-sequencing-manager.cpp
@@ -19,40 +19,103 @@
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  **/
 
+#include "test-common.hpp"
 #include "sequencing-manager.hpp"
 #include <boost/test/unit_test.hpp>
+#include <boost/filesystem.hpp>
+#include <string>
+#include <iostream>
+#include <fstream>
+
+using namespace ndn;
 
 namespace nlsr {
 
 namespace test {
 
-BOOST_AUTO_TEST_SUITE(TestSequencingManager)
-
-BOOST_AUTO_TEST_CASE(SequencingManagerBasic)
+class SequencingManagerFixture : public BaseFixture
 {
-  SequencingManager sm1(120, 121, 122);
+public:
+  SequencingManagerFixture()
+  : m_seqNumbers("")
+  , m_seqManager()
+  {
+    setFileDir();
+  }
 
-  SequencingManager sm2(sm1.getCombinedSeqNo());
+  ~SequencingManagerFixture()
+  {
+    boost::filesystem::remove(seqFile);
+  }
 
-  BOOST_CHECK_EQUAL(sm2.getNameLsaSeq(), (uint32_t)120);
+  void
+  setFileDir() {
+    m_seqManager.setSeqFileDirectory("/tmp");
+  }
 
-  BOOST_CHECK_EQUAL(sm2.getAdjLsaSeq(), (uint32_t)121);
+  void
+  writeToFile(const std::string& testSeq) {
+    std::ofstream outputFile(seqFile, std::ofstream::trunc);
+    outputFile << testSeq;
+    outputFile.close();
+  }
 
-  BOOST_CHECK_EQUAL(sm2.getCorLsaSeq(), (uint32_t)122);
+  void
+  initiateFromFile(const int& type) {
+    m_seqManager.initiateSeqNoFromFile(type);
+  }
+
+  void
+  checkSeqNumbers(const uint64_t& name, const uint64_t& adj, const uint64_t& cor) {
+    BOOST_CHECK_EQUAL(m_seqManager.getNameLsaSeq(), name);
+
+    BOOST_CHECK_EQUAL(m_seqManager.getAdjLsaSeq(), adj);
+
+    BOOST_CHECK_EQUAL(m_seqManager.getCorLsaSeq(), cor);
+  }
+
+private:
+  std::string m_seqNumbers;
+  std::string seqFile = "/tmp/nlsrSeqNo.txt";
+  SequencingManager m_seqManager;
+};
+
+BOOST_FIXTURE_TEST_SUITE(TestSequencingManager, SequencingManagerFixture)
+
+BOOST_AUTO_TEST_CASE(CombinedSeqNumber)
+{
+  // LS
+  writeToFile("27121653322350672");
+
+  initiateFromFile(HYPERBOLIC_STATE_OFF);
+
+  checkSeqNumbers(24667+10, 80+10, 0);
+
+  // HR
+  writeToFile("27121653322350672");
+
+  initiateFromFile(HYPERBOLIC_STATE_ON);
+
+  // AdjLsa is set to 0 since HR is on
+  checkSeqNumbers(24667+10, 0, 0+10);
 }
 
-BOOST_AUTO_TEST_CASE(BitMask)
+BOOST_AUTO_TEST_CASE(SeparateSeqNumber)
 {
-  uint64_t nameLsaSeqNoMax = 0xFFFFFF;
-  uint64_t corLsaSeqNoMax = 0xFFFFF;
-  uint64_t adjLsaSeqNoMax = 0xFFFFF;
+  // LS
+  writeToFile("NameLsaSeq 100\nAdjLsaSeq 100\nCorLsaSeq 0");
 
-  uint64_t seqNo = (nameLsaSeqNoMax << 40) | (corLsaSeqNoMax << 20) | adjLsaSeqNoMax;
-  SequencingManager manager(seqNo);
+  initiateFromFile(HYPERBOLIC_STATE_OFF);
 
-  BOOST_CHECK_EQUAL(manager.getNameLsaSeq(), nameLsaSeqNoMax);
-  BOOST_CHECK_EQUAL(manager.getCorLsaSeq(), corLsaSeqNoMax);
-  BOOST_CHECK_EQUAL(manager.getAdjLsaSeq(), adjLsaSeqNoMax);
+  checkSeqNumbers(100+10, 100+10, 0);
+
+  // HR
+  writeToFile("NameLsa 100\nAdjLsa 0\nCorLsa 100");
+
+  initiateFromFile(HYPERBOLIC_STATE_ON);
+
+  // AdjLsa is set to 0 since HR is on
+  checkSeqNumbers(100+10, 0, 100+10);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/test-sync-logic-handler.cpp b/tests/test-sync-logic-handler.cpp
index ef990cf..ea23571 100644
--- a/tests/test-sync-logic-handler.cpp
+++ b/tests/test-sync-logic-handler.cpp
@@ -37,7 +37,7 @@
   SyncLogicFixture()
     : face(std::make_shared<ndn::util::DummyClientFace>())
     , nlsr(g_ioService, g_scheduler, std::ref(*face), g_keyChain)
-    , sync(nlsr.getSyncLogicHandler())
+    , sync(nlsr.getLsdb().getSyncLogicHandler())
     , CONFIG_NETWORK("/ndn")
     , CONFIG_SITE("/site")
     , CONFIG_ROUTER_NAME("/%C1.Router/this-router")
@@ -72,34 +72,38 @@
   const std::string CONFIG_NETWORK;
   const std::string CONFIG_SITE;
   const std::string CONFIG_ROUTER_NAME;
+  const std::vector<std::string> lsaTypes = {NameLsa::TYPE_STRING, AdjLsa::TYPE_STRING,
+                                             CoordinateLsa::TYPE_STRING};
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestSyncLogicHandler, SyncLogicFixture)
 
 BOOST_AUTO_TEST_CASE(UpdateForOtherLS)
 {
-  std::string updateName = nlsr.getConfParameter().getLsaPrefix().toUri() +
-                           CONFIG_SITE + "/%C1.Router/other-router/";
+  std::vector<std::string> lsaTypes = {NameLsa::TYPE_STRING, AdjLsa::TYPE_STRING};
 
   uint64_t syncSeqNo = 1;
-  receiveUpdate(updateName, syncSeqNo, sync);
 
-  std::vector<ndn::Interest>& interests = face->sentInterests;
+  for (const std::string& lsaType : lsaTypes) {
+    std::string updateName = nlsr.getConfParameter().getLsaPrefix().toUri() +
+                             CONFIG_SITE + "/%C1.Router/other-router/" + lsaType;
 
-  std::vector<ndn::Interest>::iterator it = interests.begin();
+    receiveUpdate(updateName, syncSeqNo, sync);
 
-  BOOST_REQUIRE_EQUAL(interests.size(), 2);
+    std::vector<ndn::Interest>& interests = face->sentInterests;
 
-  BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + NameLsa::TYPE_STRING + "/");
+    std::vector<ndn::Interest>::iterator it = interests.begin();
 
-  ++it;
-  BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + AdjLsa::TYPE_STRING + "/");
+    BOOST_REQUIRE_EQUAL(interests.size(), 1);
+
+    BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + "/");
+  }
 }
 
 BOOST_AUTO_TEST_CASE(UpdateForOtherHR)
 {
   Nlsr nlsr_hr(g_ioService, g_scheduler, std::ref(*face), g_keyChain);
-  SyncLogicHandler& sync_hr(nlsr_hr.getSyncLogicHandler());
+  SyncLogicHandler& sync_hr(nlsr_hr.getLsdb().getSyncLogicHandler());
 
   nlsr_hr.getConfParameter().setNetwork(CONFIG_NETWORK);
   nlsr_hr.getConfParameter().setSiteName(CONFIG_SITE);
@@ -110,30 +114,30 @@
 
   nlsr_hr.initialize();
 
-  std::string updateName = nlsr_hr.getConfParameter().getLsaPrefix().toUri() +
-                           CONFIG_SITE + "/%C1.Router/other-router/";
+  uint64_t syncSeqNo = 1;
 
-  uint64_t syncSeqNo = 0;
-  syncSeqNo = syncSeqNo | (static_cast<uint64_t>(1) << 20);
+  std::vector<std::string> lsaTypes = {NameLsa::TYPE_STRING, CoordinateLsa::TYPE_STRING};
 
-  receiveUpdate(updateName, syncSeqNo, sync_hr);
+  for (const std::string& lsaType : lsaTypes) {
+    std::string updateName = nlsr_hr.getConfParameter().getLsaPrefix().toUri() +
+                           CONFIG_SITE + "/%C1.Router/other-router/" + lsaType;
 
-  std::vector<ndn::Interest>& interests = face->sentInterests;
-  std::vector<ndn::Interest>::iterator it = interests.begin();
+    receiveUpdate(updateName, syncSeqNo, sync_hr);
 
-  BOOST_REQUIRE_EQUAL(interests.size(), 2);
+    std::vector<ndn::Interest>& interests = face->sentInterests;
+    std::vector<ndn::Interest>::iterator it = interests.begin();
 
-  BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + NameLsa::TYPE_STRING + "/");
+    BOOST_REQUIRE_EQUAL(interests.size(), 1);
 
-  ++it;
-  BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + CoordinateLsa::TYPE_STRING + "/");
+    BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + "/");
+  }
 }
 
 BOOST_AUTO_TEST_CASE(UpdateForOtherHRDry)
 {
 
   Nlsr nlsr_hrdry(g_ioService, g_scheduler, std::ref(*face),g_keyChain);
-  SyncLogicHandler& sync_hrdry(nlsr_hrdry.getSyncLogicHandler());
+  SyncLogicHandler& sync_hrdry(nlsr_hrdry.getLsdb().getSyncLogicHandler());
 
   nlsr_hrdry.getConfParameter().setNetwork(CONFIG_NETWORK);
   nlsr_hrdry.getConfParameter().setSiteName(CONFIG_SITE);
@@ -144,56 +148,50 @@
 
   nlsr_hrdry.initialize();
 
-  std::string updateName = nlsr.getConfParameter().getLsaPrefix().toUri() +
-                           CONFIG_SITE + "/%C1.Router/other-router/";
+  for (const std::string& lsaType : lsaTypes) {
+
+    std::string updateName = nlsr.getConfParameter().getLsaPrefix().toUri() +
+                 CONFIG_SITE + "/%C1.Router/other-router/" + lsaType;
 
 
-  uint64_t syncSeqNo = 1;
-  syncSeqNo = syncSeqNo | (static_cast<uint64_t>(1) << 20);
-  receiveUpdate(updateName, syncSeqNo, sync_hrdry);
+    uint64_t syncSeqNo = 1;
 
-  std::vector<ndn::Interest>& interests = face->sentInterests;
-  std::vector<ndn::Interest>::iterator it = interests.begin();
+    receiveUpdate(updateName, syncSeqNo, sync_hrdry);
 
-  BOOST_REQUIRE_EQUAL(interests.size(), 3);
+    std::vector<ndn::Interest>& interests = face->sentInterests;
 
-  BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + NameLsa::TYPE_STRING + "/");
+    std::vector<ndn::Interest>::iterator it = interests.begin();
 
-  if (nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_ON) {
-      ++it;
-      BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + CoordinateLsa::TYPE_STRING + "/");
-  }
-  else if (nlsr.getConfParameter().getHyperbolicState() == HYPERBOLIC_STATE_OFF) {
-      ++it;
-      BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + AdjLsa::TYPE_STRING + "/");
-  }
-  else {
-      ++it;
-      BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + CoordinateLsa::TYPE_STRING + "/");
-
-      ++it;
-      BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + AdjLsa::TYPE_STRING + "/");
+    // In HR dry-state all LSA's should be published
+    BOOST_REQUIRE_EQUAL(interests.size(), 1);
+    BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + "/");
   }
 }
 
+
 BOOST_AUTO_TEST_CASE(NoUpdateForSelf)
 {
-  std::string updateName = nlsr.getConfParameter().getLsaPrefix().toUri() +
-                           CONFIG_SITE + CONFIG_ROUTER_NAME;
+  for (const std::string& lsaType : lsaTypes) {
+    std::string updateName = nlsr.getConfParameter().getLsaPrefix().toUri() +
+                             CONFIG_SITE + CONFIG_ROUTER_NAME + lsaType;
 
-  receiveUpdate(updateName, 1, sync);
+    receiveUpdate(updateName, 1, sync);
 
-  std::vector<ndn::Interest>& interests = face->sentInterests;
-  BOOST_CHECK_EQUAL(interests.size(), 0);
+    std::vector<ndn::Interest>& interests = face->sentInterests;
+    BOOST_CHECK_EQUAL(interests.size(), 0);
+  }
 }
 
+
 BOOST_AUTO_TEST_CASE(MalformedUpdate)
 {
-  std::string updateName = CONFIG_SITE + nlsr.getConfParameter().getLsaPrefix().toUri() +
-                           CONFIG_ROUTER_NAME;
+  for (const std::string& lsaType : lsaTypes) {
+    std::string updateName = CONFIG_SITE + nlsr.getConfParameter().getLsaPrefix().toUri() +
+                             CONFIG_ROUTER_NAME + lsaType;
 
-  std::vector<ndn::Interest>& interests = face->sentInterests;
-  BOOST_CHECK_EQUAL(interests.size(), 0);
+    std::vector<ndn::Interest>& interests = face->sentInterests;
+    BOOST_CHECK_EQUAL(interests.size(), 0);
+  }
 }
 
 BOOST_AUTO_TEST_CASE(SequenceNumber)
@@ -219,31 +217,31 @@
   lsdb.installCoordinateLsa(corLsa);
 
   std::string updateName = nlsr.getConfParameter().getLsaPrefix().toUri() +
-                           CONFIG_SITE + "/%C1.Router/other-router/";
+                           CONFIG_SITE + "/%C1.Router/other-router/" + NameLsa::TYPE_STRING;
 
   // Lower NameLSA sequence number
-  uint64_t lowerSeqNo = static_cast<uint64_t>(998) << 40;
+  uint64_t lowerSeqNo = 998;
   receiveUpdate(updateName, lowerSeqNo, sync);
 
   std::vector<ndn::Interest>& interests = face->sentInterests;
   BOOST_REQUIRE_EQUAL(interests.size(), 0);
 
   // Same NameLSA sequence number
-  uint64_t sameSeqNo = static_cast<uint64_t>(999) << 40;
+  uint64_t sameSeqNo = 999;
   receiveUpdate(updateName, sameSeqNo, sync);
 
   interests = face->sentInterests;
   BOOST_REQUIRE_EQUAL(interests.size(), 0);
 
   // Higher NameLSA sequence number
-  uint64_t higherSeqNo = static_cast<uint64_t>(1000) << 40;
+  uint64_t higherSeqNo = 1000;
   receiveUpdate(updateName, higherSeqNo, sync);
 
   interests = face->sentInterests;
   BOOST_REQUIRE_EQUAL(interests.size(), 1);
 
   std::vector<ndn::Interest>::iterator it = interests.begin();
-  BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + "name/");
+  BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + "/");
 }
 
 BOOST_AUTO_TEST_CASE(UpdatePrefix)
@@ -254,7 +252,9 @@
 
   nlsr.initialize();
 
-  BOOST_CHECK_EQUAL(sync.m_updatePrefix, expectedPrefix);
+  BOOST_CHECK_EQUAL(sync.m_nameLsaUserPrefix, ndn::Name(expectedPrefix).append(NameLsa::TYPE_STRING));
+  BOOST_CHECK_EQUAL(sync.m_adjLsaUserPrefix, ndn::Name(expectedPrefix).append(AdjLsa::TYPE_STRING));
+  BOOST_CHECK_EQUAL(sync.m_coorLsaUserPrefix, ndn::Name(expectedPrefix).append(CoordinateLsa::TYPE_STRING));
 }
 
 BOOST_AUTO_TEST_CASE(CreateSyncSocketOnInitialization) // Bug #2649
@@ -267,7 +267,7 @@
   BOOST_REQUIRE(lsa == nullptr);
 
   // Publish a routing update before an Adjacency LSA is built
-  BOOST_CHECK_NO_THROW(sync.publishRoutingUpdate());
+  BOOST_CHECK_NO_THROW(sync.publishRoutingUpdate(AdjLsa::TYPE_STRING, 0));
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/update/test-nfd-rib-command-processor.cpp b/tests/update/test-nfd-rib-command-processor.cpp
index 3c0ae47..81b66ce 100644
--- a/tests/update/test-nfd-rib-command-processor.cpp
+++ b/tests/update/test-nfd-rib-command-processor.cpp
@@ -56,6 +56,8 @@
 
     this->advanceClocks(ndn::time::milliseconds(10));
     face.sentInterests.clear();
+
+    nameLsaSeqNoBeforeInterest = nlsr.getLsdb().getSequencingManager().getNameLsaSeq();
   }
 
   std::shared_ptr<ndn::Interest>
@@ -73,9 +75,11 @@
     // 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);
+
     // The part after LSA is Chronosync getSession
     lsaInterestName.append(sessionTime);
-    lsaInterestName.appendNumber(nlsr.getSequencingManager().getCombinedSeqNo());
+    lsaInterestName.appendNumber(nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
     shared_ptr<ndn::Interest> lsaInterest = make_shared<ndn::Interest>(lsaInterestName);
 
     face.receive(*lsaInterest);
@@ -89,7 +93,7 @@
     const ndn::Name& lsaPrefix = nlsr.getConfParameter().getLsaPrefix();
 
     const auto& it = std::find_if(face.sentData.begin(), face.sentData.end(),
-      [lsaPrefix] (const ndn::Data& data) {
+      [&] (const ndn::Data& data) {
         return lsaPrefix.isPrefixOf(data.getName());
       });
 
@@ -104,6 +108,7 @@
   NamePrefixList& namePrefixes;
   NfdRibCommandProcessor& processor;
   ndn::Name sessionTime;
+  uint64_t nameLsaSeqNoBeforeInterest;
 };
 
 typedef boost::mpl::vector<NfdRibRegisterCommand, NfdRibUnregisterCommand> Commands;
@@ -150,6 +155,7 @@
   }
   BOOST_CHECK_EQUAL((*itr), parameters.getName());
   BOOST_CHECK(wasRoutingUpdatePublished());
+  BOOST_CHECK(nameLsaSeqNoBeforeInterest < nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 }
 
 BOOST_AUTO_TEST_CASE(RemovePrefix)
@@ -170,6 +176,7 @@
     BOOST_FAIL("Prefix was not removed!");
   }
   BOOST_CHECK(wasRoutingUpdatePublished());
+  BOOST_CHECK(nameLsaSeqNoBeforeInterest < nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 }
 
 BOOST_AUTO_TEST_CASE(onReceiveInterestRegisterCommand)
@@ -192,6 +199,7 @@
   }
   BOOST_CHECK_EQUAL((*itr), prefixName);
   BOOST_CHECK(wasRoutingUpdatePublished());
+  BOOST_CHECK(nameLsaSeqNoBeforeInterest < nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 }
 
 BOOST_AUTO_TEST_CASE(onReceiveInterestUnregisterCommand)
@@ -210,6 +218,7 @@
 
   BOOST_CHECK_EQUAL(namePrefixes.getNameList().size(), 0);
   BOOST_CHECK(wasRoutingUpdatePublished());
+  BOOST_CHECK(nameLsaSeqNoBeforeInterest < nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 }
 
 BOOST_AUTO_TEST_CASE(onReceiveInterestInvalidPrefix)
@@ -225,7 +234,10 @@
   this->advanceClocks(ndn::time::milliseconds(10));
 
   BOOST_CHECK_EQUAL(namePrefixes.getNameList().size(), 0);
-  BOOST_CHECK(!wasRoutingUpdatePublished());
+
+  // Cannot use routingUpdatePublish test now since in
+  // initialize nlsr calls buildOwnNameLsa which publishes the routing update
+  BOOST_CHECK(nameLsaSeqNoBeforeInterest == nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/update/test-prefix-update-processor.cpp b/tests/update/test-prefix-update-processor.cpp
index 169fc48..efb24a0 100644
--- a/tests/update/test-prefix-update-processor.cpp
+++ b/tests/update/test-prefix-update-processor.cpp
@@ -161,9 +161,12 @@
     // 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);
+
     // The part after LSA is Chronosync getSession
     lsaInterestName.append(sessionTime);
-    lsaInterestName.appendNumber(nlsr.getSequencingManager().getCombinedSeqNo());
+    lsaInterestName.appendNumber(nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
+
     shared_ptr<Interest> lsaInterest = make_shared<Interest>(lsaInterestName);
 
     face.receive(*lsaInterest);
@@ -231,6 +234,7 @@
 
 BOOST_AUTO_TEST_CASE(Basic)
 {
+  uint64_t nameLsaSeqNoBeforeInterest = nlsr.getLsdb().getSequencingManager().getNameLsaSeq();
   updateProcessor.enable();
 
   // Advertise
@@ -252,8 +256,10 @@
   BOOST_CHECK_EQUAL(namePrefixList.getNameList().front(), parameters.getName());
 
   BOOST_CHECK(wasRoutingUpdatePublished());
+  BOOST_CHECK(nameLsaSeqNoBeforeInterest < nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 
   face.sentData.clear();
+  nameLsaSeqNoBeforeInterest = nlsr.getLsdb().getSequencingManager().getNameLsaSeq();
 
   // Withdraw
   ndn::Name withdrawCommand("/localhost/nlsr/prefix-update/withdraw");
@@ -268,6 +274,7 @@
   BOOST_CHECK_EQUAL(namePrefixList.getSize(), 0);
 
   BOOST_CHECK(wasRoutingUpdatePublished());
+  BOOST_CHECK(nameLsaSeqNoBeforeInterest < nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 }
 
 BOOST_AUTO_TEST_CASE(DisabledAndEnabled)
