diff --git a/tests/communication/test-sync-logic-handler.cpp b/tests/communication/test-sync-logic-handler.cpp
index 4dc6346..2352735 100644
--- a/tests/communication/test-sync-logic-handler.cpp
+++ b/tests/communication/test-sync-logic-handler.cpp
@@ -61,12 +61,12 @@
     if (Protocol == SYNC_PROTOCOL_CHRONOSYNC) {
       std::vector<chronosync::MissingDataInfo> updates;
       updates.push_back({ndn::Name(prefix).appendNumber(1), 0, seqNo});
-      sync.m_syncLogic->onChronoSyncUpdate(updates);
+      sync.m_syncLogic.onChronoSyncUpdate(updates);
     }
     else {
       std::vector<psync::MissingDataInfo> updates;
       updates.push_back({ndn::Name(prefix), 0, seqNo});
-      sync.m_syncLogic->onPSyncUpdate(updates);
+      sync.m_syncLogic.onPSyncUpdate(updates);
     }
 
     this->advanceClocks(ndn::time::milliseconds(1), 10);
@@ -246,8 +246,6 @@
   expectedPrefix.append(this->conf.getSiteName());
   expectedPrefix.append(this->conf.getRouterName());
 
-  this->sync.buildUpdatePrefix();
-
   BOOST_CHECK_EQUAL(this->sync.m_nameLsaUserPrefix,
                     ndn::Name(expectedPrefix).append(std::to_string(Lsa::Type::NAME)));
   BOOST_CHECK_EQUAL(this->sync.m_adjLsaUserPrefix,
@@ -256,27 +254,6 @@
                     ndn::Name(expectedPrefix).append(std::to_string(Lsa::Type::COORDINATE)));
 }
 
-/* Tests that SyncLogicHandler's socket will be created when
-   Nlsr is initialized, 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.
- */
-BOOST_FIXTURE_TEST_CASE_TEMPLATE(createSyncLogicOnInitialization, T, Protocols,
-                                 SyncLogicFixture<T::value>) // Bug #2649
-{
-  Nlsr nlsr(this->face, this->m_keyChain, this->conf);
-
-  // Make sure an adjacency LSA has not been built yet
-  ndn::Name key = ndn::Name(this->conf.getRouterPrefix()).append(std::to_string(Lsa::Type::ADJACENCY));
-  AdjLsa* lsa = nlsr.m_lsdb.findAdjLsa(key);
-  BOOST_REQUIRE(lsa == nullptr);
-
-  // Publish a routing update before an Adjacency LSA is built
-  BOOST_CHECK_NO_THROW(nlsr.m_lsdb.m_sync.publishRoutingUpdate(Lsa::Type::ADJACENCY, 0));
-}
-
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace test
diff --git a/tests/publisher/test-dataset-interest-handler.cpp b/tests/publisher/test-dataset-interest-handler.cpp
index ee96ba8..070c06d 100644
--- a/tests/publisher/test-dataset-interest-handler.cpp
+++ b/tests/publisher/test-dataset-interest-handler.cpp
@@ -45,9 +45,7 @@
   parser.parse();
 
   ndn::Block::element_const_iterator it = parser.elements_begin();
-  BOOST_CHECK_EQUAL(isSameType(*it), true);
-  ++it;
-
+  BOOST_CHECK_EQUAL(isSameType(*it++), true);
   BOOST_CHECK(it == parser.elements_end());
 
   face.sentData.clear();
diff --git a/tests/route/test-fib.cpp b/tests/route/test-fib.cpp
index 2e975e8..ae297de 100644
--- a/tests/route/test-fib.cpp
+++ b/tests/route/test-fib.cpp
@@ -53,10 +53,6 @@
 
     fib = std::make_shared<Fib>(*face, m_scheduler, adjacencies, conf, m_keyChain);
     fib->setEntryRefreshTime(1);
-
-    fib->m_faceMap.update(router1FaceUri, router1FaceId);
-    fib->m_faceMap.update(router2FaceUri, router2FaceId);
-    fib->m_faceMap.update(router3FaceUri, router3FaceId);
   }
 
 public:
diff --git a/tests/route/test-name-prefix-table.cpp b/tests/route/test-name-prefix-table.cpp
index 947f8e1..a97520d 100644
--- a/tests/route/test-name-prefix-table.cpp
+++ b/tests/route/test-name-prefix-table.cpp
@@ -56,7 +56,7 @@
   conf.setNetwork("/ndn");
   conf.setSiteName("/router");
   conf.setRouterName("/a");
-  conf.buildRouterPrefix();
+  conf.buildRouterAndSyncUserPrefix();
 
   RoutingTable& routingTable = nlsr.m_routingTable;
   routingTable.setRoutingCalcInterval(0);
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index 9a648a0..878a27d 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -181,10 +181,10 @@
     conf.setNetwork("/ndn");
     conf.setSiteName("/site");
     conf.setRouterName("/%C1.Router/this-router");
-    conf.buildRouterPrefix();
+    conf.buildRouterAndSyncUserPrefix();
 
     conf.setSyncProtocol(protocol);
-    conf.setHyperbolicState(HYPERBOLIC_STATE_OFF);
+    conf.setHyperbolicState(hyperbolicState);
   }
 };
 
diff --git a/tests/test-conf-file-processor.cpp b/tests/test-conf-file-processor.cpp
index 2d5958d..d00f6ed 100644
--- a/tests/test-conf-file-processor.cpp
+++ b/tests/test-conf-file-processor.cpp
@@ -54,8 +54,7 @@
   "  hello-retries 3\n"
   "  hello-timeout 1\n"
   "  hello-interval  60\n\n"
-  "  adj-lsa-build-interval 3\n"
-  "  first-hello-interval  6\n"
+  "  adj-lsa-build-interval 10\n"
   "  neighbor\n"
   "  {\n"
   "    name /ndn/memphis.edu/cs/castor\n"
@@ -162,7 +161,7 @@
 BOOST_AUTO_TEST_CASE(LinkState)
 {
   processConfigurationString(CONFIG_LINK_STATE);
-  conf.buildRouterPrefix();
+  conf.buildRouterAndSyncUserPrefix();
 
   // General
   BOOST_CHECK_EQUAL(conf.getNetwork(), "/ndn/");
@@ -183,8 +182,7 @@
   BOOST_CHECK_EQUAL(conf.getInterestResendTime(), 1);
   BOOST_CHECK_EQUAL(conf.getInfoInterestInterval(), 60);
 
-  BOOST_CHECK_EQUAL(conf.getAdjLsaBuildInterval(), 3);
-  BOOST_CHECK_EQUAL(conf.getFirstHelloInterval(), 6);
+  BOOST_CHECK_EQUAL(conf.getAdjLsaBuildInterval(), 10);
 
   BOOST_CHECK(conf.getAdjacencyList().isNeighbor("/ndn/memphis.edu/cs/mira"));
   BOOST_CHECK(conf.getAdjacencyList().isNeighbor("/ndn/memphis.edu/cs/castor"));
@@ -219,8 +217,7 @@
     "  hello-retries 3\n"
     "  hello-timeout 1\n"
     "  hello-interval  60\n\n"
-    "  adj-lsa-build-interval 3\n"
-    "  first-hello-interval  6\n"
+    "  adj-lsa-build-interval 10\n"
     "  neighbor\n"
     "  {\n"
     "    name /ndn/memphis.edu/cs/castor\n"
@@ -286,8 +283,6 @@
   BOOST_CHECK_EQUAL(conf.getInterestRetryNumber(), static_cast<uint32_t>(HELLO_RETRIES_DEFAULT));
   BOOST_CHECK_EQUAL(conf.getInterestResendTime(), static_cast<uint32_t>(HELLO_TIMEOUT_DEFAULT));
   BOOST_CHECK_EQUAL(conf.getInfoInterestInterval(), static_cast<uint32_t>(HELLO_INTERVAL_DEFAULT));
-  BOOST_CHECK_EQUAL(conf.getFirstHelloInterval(),
-                    static_cast<uint32_t>(FIRST_HELLO_INTERVAL_DEFAULT));
   BOOST_CHECK_EQUAL(conf.getAdjLsaBuildInterval(),
                     static_cast<uint32_t>(ADJ_LSA_BUILD_INTERVAL_DEFAULT));
 }
diff --git a/tests/test-conf-parameter.cpp b/tests/test-conf-parameter.cpp
index a42d596..7b3b74e 100644
--- a/tests/test-conf-parameter.cpp
+++ b/tests/test-conf-parameter.cpp
@@ -79,10 +79,12 @@
 
   BOOST_CHECK_EQUAL(cp1.getNetwork(), "ATT");
 
-  cp1.buildRouterPrefix();
+  cp1.buildRouterAndSyncUserPrefix();
 
   BOOST_CHECK_EQUAL(cp1.getRouterPrefix(), "/ATT/memphis/router1");
 
+  BOOST_CHECK_EQUAL(cp1.getSyncUserPrefix(), "/localhop/ATT/nlsr/LSA/memphis/router1");
+
   BOOST_CHECK_EQUAL(cp1.getInterestRetryNumber(), 2);
 
   BOOST_CHECK_EQUAL(cp1.getInterestResendTime(), 1000);
diff --git a/tests/test-lsdb.cpp b/tests/test-lsdb.cpp
index 6e02ffc..2e6a6ff 100644
--- a/tests/test-lsdb.cpp
+++ b/tests/test-lsdb.cpp
@@ -183,14 +183,15 @@
   int nPrefixes = 0;
   while (nameLsa->serialize().size() < ndn::MAX_NDN_PACKET_SIZE) {
     nameLsa->addName(ndn::Name(prefix).appendNumber(++nPrefixes));
+    break;
   }
   lsdb.installNameLsa(*nameLsa);
 
   // Create another Lsdb and expressInterest
   ndn::util::DummyClientFace face2(m_ioService, m_keyChain, {true, true});
   face.linkTo(face2);
+
   ConfParameter conf2(face2);
-  Nlsr nlsr2(face2, m_keyChain, conf2);
   std::string config = R"CONF(
               trust-anchor
                 {
@@ -198,19 +199,19 @@
                 }
             )CONF";
   conf2.getValidator().load(config, "config-file-from-string");
+  Nlsr nlsr2(face2, m_keyChain, conf2);
 
   Lsdb& lsdb2(nlsr2.m_lsdb);
 
-  advanceClocks(ndn::time::milliseconds(1), 10);
+  advanceClocks(ndn::time::milliseconds(10), 10);
 
   ndn::Name interestName("/localhop/ndn/nlsr/LSA/site/%C1.Router/this-router/NAME");
   interestName.appendNumber(seqNo);
-  // 0 == timeout count
-  lsdb2.expressInterest(interestName, 0);
+  lsdb2.expressInterest(interestName, 0/*= timeout count*/);
 
-  advanceClocks(ndn::time::milliseconds(1), 10);
+  advanceClocks(ndn::time::milliseconds(200), 20);
 
-  BOOST_CHECK_EQUAL(lsdb.getNameLsdb().front().getNpl(), lsdb2.getNameLsdb().front().getNpl());
+  BOOST_CHECK_EQUAL(lsdb.getNameLsdb().front().getNpl(), lsdb2.getNameLsdb().back().getNpl());
 }
 
 BOOST_AUTO_TEST_CASE(SegmentLsaData)
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index 6be31ed..f5ffb8e 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -65,6 +65,7 @@
   AdjacencyList& neighbors;
   uint32_t nSuccessCallbacks;
   uint32_t nFailureCallbacks;
+  ndn::util::signal::ScopedConnection connection;
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestNlsr, NlsrFixture)
@@ -121,7 +122,6 @@
 {
   // Simulate loading configuration file
   conf.setAdjLsaBuildInterval(3);
-  conf.setFirstHelloInterval(6);
   conf.setRoutingCalcInterval(9);
 
   Nlsr nlsr2(m_face, m_keyChain, conf);
@@ -130,7 +130,6 @@
   const RoutingTable& rt = nlsr2.m_routingTable;
 
   BOOST_CHECK_EQUAL(lsdb.m_adjLsaBuildInterval, ndn::time::seconds(3));
-  BOOST_CHECK_EQUAL(conf.getFirstHelloInterval(), 6);
   BOOST_CHECK_EQUAL(rt.getRoutingCalcInterval(), ndn::time::seconds(9));
 }
 
@@ -265,6 +264,9 @@
                           10, Adjacent::STATUS_ACTIVE, 0, 256);
   neighbors.insert(otherNeighbor);
 
+  // Set HelloInterest lifetime as 10 seconds so that neighbors are not marked INACTIVE
+  // upon timeout before this test ends
+  conf.setInterestResendTime(10);
   nlsr.initialize();
 
   // Simulate successful HELLO responses
@@ -531,9 +533,6 @@
   conf.setFaceDatasetFetchInterval(fetchInterval);
   conf.setFaceDatasetFetchTries(0);
 
-  nlsr.initializeFaces(std::bind(&Nlsr::processFaceDataset, &nlsr, _1),
-                       std::bind(&Nlsr::onFaceDatasetFetchTimeout, &nlsr, _1, _2, 0));
-
   // Elapse the default timeout time of the interest.
   this->advanceClocks(defaultTimeout);
 
diff --git a/tests/test-statistics.cpp b/tests/test-statistics.cpp
index 5926701..83479c7 100644
--- a/tests/test-statistics.cpp
+++ b/tests/test-statistics.cpp
@@ -36,15 +36,12 @@
   StatisticsFixture()
     : face(m_ioService, m_keyChain)
     , conf(face)
+    , confProcessor(conf)
     , nlsr(face, m_keyChain, conf)
     , lsdb(nlsr.m_lsdb)
     , hello(nlsr.m_helloProtocol)
     , collector(nlsr.m_statsCollector)
   {
-    conf.setNetwork("/ndn");
-    conf.setSiteName("/site");
-    conf.setRouterName("/%C1.Router/this-router");
-    conf.buildRouterPrefix();
     // Otherwise code coverage node fails with default 60 seconds lifetime
     conf.setSyncInterestLifetime(1000);
 
@@ -116,6 +113,7 @@
 public:
   ndn::util::DummyClientFace face;
   ConfParameter conf;
+  DummyConfFileProcessor confProcessor;
   Nlsr nlsr;
 
   Lsdb& lsdb;
@@ -254,6 +252,7 @@
   nameLsaKey.append(std::to_string(Lsa::Type::NAME));
 
   NameLsa* nameLsa = lsdb.findNameLsa(nameLsaKey);
+  BOOST_ASSERT(nameLsa != nullptr);
 
   seqNo = nameLsa->getLsSeqNo();
 
