diff --git a/tests/communication/test-sync-logic-handler.cpp b/tests/communication/test-sync-logic-handler.cpp
index 2352735..de99239 100644
--- a/tests/communication/test-sync-logic-handler.cpp
+++ b/tests/communication/test-sync-logic-handler.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -20,7 +20,7 @@
  **/
 
 #include "communication/sync-logic-handler.hpp"
-#include "../test-common.hpp"
+#include "tests/test-common.hpp"
 #include "common.hpp"
 #include "nlsr.hpp"
 #include "lsa.hpp"
@@ -38,7 +38,7 @@
 public:
   SyncLogicFixture()
     : face(m_ioService, m_keyChain)
-    , conf(face)
+    , conf(face, m_keyChain)
     , confProcessor(conf, Protocol)
     , testIsLsaNew([] (const ndn::Name& name, const Lsa::Type& lsaType,
                        const uint64_t sequenceNumber) {
diff --git a/tests/publisher/publisher-fixture.hpp b/tests/publisher/publisher-fixture.hpp
index f5b37fa..be97a34 100644
--- a/tests/publisher/publisher-fixture.hpp
+++ b/tests/publisher/publisher-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -45,7 +45,7 @@
 public:
   PublisherFixture()
     : face(m_ioService, m_keyChain, {true, true})
-    , conf(face)
+    , conf(face, m_keyChain)
     , confProcessor(conf)
     , nlsr(face, m_keyChain, conf)
     , lsdb(nlsr.m_lsdb)
@@ -58,23 +58,6 @@
   }
 
   void
-  checkPrefixRegistered(const Name& prefix)
-  {
-    bool registerCommandEmitted = false;
-    for (const auto& interest : face.sentInterests) {
-      if (interest.getName().size() > 4 && interest.getName().get(3) == name::Component("register")) {
-        name::Component test = interest.getName().get(4);
-        ndn::nfd::ControlParameters params(test.blockFromValue());
-        if (params.getName() == prefix) {
-          registerCommandEmitted = true;
-          break;
-        }
-      }
-    }
-    BOOST_CHECK(registerCommandEmitted);
-  }
-
-  void
   addAdjacency(AdjLsa& lsa, const std::string& name, const std::string& faceUri, double cost)
   {
     Adjacent adjacency(name, ndn::FaceUri(faceUri), cost, Adjacent::STATUS_ACTIVE, 0, 0);
diff --git a/tests/publisher/test-dataset-interest-handler.cpp b/tests/publisher/test-dataset-interest-handler.cpp
index 102be58..b25576f 100644
--- a/tests/publisher/test-dataset-interest-handler.cpp
+++ b/tests/publisher/test-dataset-interest-handler.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -52,7 +52,7 @@
 
 BOOST_AUTO_TEST_CASE(Localhost)
 {
-  checkPrefixRegistered(Nlsr::LOCALHOST_PREFIX);
+  nlsr::test::checkPrefixRegistered(face, Nlsr::LOCALHOST_PREFIX);
 
   // Install adjacency LSA
   AdjLsa adjLsa;
@@ -109,7 +109,7 @@
   // Should already be added to dispatcher
   BOOST_CHECK_THROW(nlsr.m_dispatcher.addTopPrefix(regRouterPrefix), std::out_of_range);
 
-  checkPrefixRegistered(regRouterPrefix);
+  nlsr::test::checkPrefixRegistered(face,regRouterPrefix);
 
   // Install adjacencies LSA
   AdjLsa adjLsa;
diff --git a/tests/route/test-fib.cpp b/tests/route/test-fib.cpp
index ae297de..5d2d27e 100644
--- a/tests/route/test-fib.cpp
+++ b/tests/route/test-fib.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -37,7 +37,7 @@
 public:
   FibFixture()
     : face(std::make_shared<ndn::util::DummyClientFace>(m_ioService, m_keyChain))
-    , conf(*face)
+    , conf(*face, m_keyChain)
     , interests(face->sentInterests)
   {
     Adjacent neighbor1(router1Name, ndn::FaceUri(router1FaceUri), 0, Adjacent::STATUS_ACTIVE, 0, router1FaceId);
diff --git a/tests/route/test-name-prefix-table.cpp b/tests/route/test-name-prefix-table.cpp
index a97520d..213ba04 100644
--- a/tests/route/test-name-prefix-table.cpp
+++ b/tests/route/test-name-prefix-table.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -33,7 +33,7 @@
 public:
   NamePrefixTableFixture()
     : face(m_ioService, m_keyChain)
-    , conf(face)
+    , conf(face, m_keyChain)
     , nlsr(face, m_keyChain, conf)
     , lsdb(nlsr.m_lsdb)
     , npt(nlsr.m_namePrefixTable)
diff --git a/tests/route/test-routing-table.cpp b/tests/route/test-routing-table.cpp
index 0f630aa..f8a7df5 100644
--- a/tests/route/test-routing-table.cpp
+++ b/tests/route/test-routing-table.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -35,8 +35,8 @@
 BOOST_AUTO_TEST_CASE(RoutingTableAddNextHop)
 {
   ndn::util::DummyClientFace face;
-  ConfParameter conf(face);
   ndn::KeyChain keyChain;
+  ConfParameter conf(face, keyChain);
   Nlsr nlsr(face, keyChain, conf);
 
   RoutingTable rt1(m_scheduler, nlsr.m_fib, nlsr.m_lsdb,
diff --git a/tests/security/test-certificate-store.cpp b/tests/security/test-certificate-store.cpp
index a37e6d8..b09bd5a 100644
--- a/tests/security/test-certificate-store.cpp
+++ b/tests/security/test-certificate-store.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2017,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -21,49 +21,202 @@
 
 #include "security/certificate-store.hpp"
 
-#include "../test-common.hpp"
+#include "tests/test-common.hpp"
+#include "nlsr.hpp"
+#include "lsdb.hpp"
 
 #include <ndn-cxx/security/key-chain.hpp>
 
 namespace nlsr {
-namespace security {
 namespace test {
 
 using std::shared_ptr;
 using namespace nlsr::test;
 
-class CertificateStoreFixture : public BaseFixture
+class CertificateStoreFixture : public UnitTestTimeFixture
 {
 public:
   CertificateStoreFixture()
+    : face(m_ioService, m_keyChain, {true, true})
+    , conf(face, m_keyChain, "unit-test-nlsr.conf")
+    , confProcessor(conf, SYNC_PROTOCOL_PSYNC, HYPERBOLIC_STATE_OFF,
+                    "/ndn/", "/site", "/%C1.Router/router1")
+    , rootIdName(conf.getNetwork())
+    , siteIdentityName(ndn::Name(conf.getNetwork()).append(conf.getSiteName()))
+    , opIdentityName(ndn::Name(conf.getNetwork())
+                     .append(ndn::Name(conf.getSiteName()))
+                     .append(ndn::Name("%C1.Operator")))
+    , routerIdName(conf.getRouterPrefix())
+    , nlsr(face, m_keyChain, conf)
+    , lsdb(nlsr.getLsdb())
+    , certStore(face, conf, lsdb)
+    , ROOT_CERT_PATH(boost::filesystem::current_path() / std::string("root.cert"))
+
   {
-    auto identity = addIdentity("/TestNLSR/identity");
-    certificateKey = identity.getDefaultKey().getName();
-    certificate = identity.getDefaultKey().getDefaultCertificate();
+    rootId = addIdentity(rootIdName);
+    siteIdentity = addSubCertificate(siteIdentityName, rootId);
+    opIdentity = addSubCertificate(opIdentityName, siteIdentity);
+    routerId = addSubCertificate(routerIdName, opIdentity);
+
+    auto certificate = conf.initializeKey();
+    if (certificate) {
+      certStore.insert(*certificate);
+    };
+
+    // Create certificate and load it to the validator
+    // previously this was done by in nlsr ctor
+    conf.loadCertToValidator(rootId.getDefaultKey().getDefaultCertificate());
+    conf.loadCertToValidator(siteIdentity.getDefaultKey().getDefaultCertificate());
+    conf.loadCertToValidator(opIdentity.getDefaultKey().getDefaultCertificate());
+    conf.loadCertToValidator(routerId.getDefaultKey().getDefaultCertificate());
+
+    std::ifstream inputFile;
+    inputFile.open(std::string("nlsr.conf"));
+
+    BOOST_REQUIRE(inputFile.is_open());
+
+    boost::property_tree::ptree pt;
+
+    boost::property_tree::read_info(inputFile, pt);
+
+    // Load security section and file name
+    for (const auto& tn : pt) {
+      if (tn.first == "security") {
+        auto it = tn.second.begin();
+        conf.getValidator().load(it->second, std::string("nlsr.conf"));
+        break;
+      }
+    }
+    inputFile.close();
+
+    this->advanceClocks(ndn::time::milliseconds(20));
   }
 
 public:
+  void
+  checkForInterest(ndn::Name& interstName)
+  {
+    std::vector<ndn::Interest>& interests = face.sentInterests;
+    BOOST_REQUIRE(interests.size() > 0);
+
+    bool didFindInterest = false;
+    for (const auto& interest : interests) {
+      didFindInterest = didFindInterest || interest.getName() == interstName;
+    }
+    BOOST_CHECK(didFindInterest);
+  }
+
+  ndn::util::DummyClientFace face;
+
+  ConfParameter conf;
+  DummyConfFileProcessor confProcessor;
+
+  ndn::Name rootIdName, siteIdentityName, opIdentityName, routerIdName;
+  ndn::security::pib::Identity rootId, siteIdentity, opIdentity, routerId;
+
+  Nlsr nlsr;
+  Lsdb& lsdb;
   ndn::security::v2::Certificate certificate;
   ndn::Name certificateKey;
+  security::CertificateStore certStore;
+  const boost::filesystem::path ROOT_CERT_PATH;
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestSecurityCertificateStore, CertificateStoreFixture)
 
 BOOST_AUTO_TEST_CASE(Basic)
 {
-  CertificateStore store;
+  ndn::Name identityName("/TestNLSR/identity");
+  identityName.appendVersion();
 
-  BOOST_REQUIRE(store.find(certificateKey) == nullptr);
-  store.insert(certificate);
+  auto identity = m_keyChain.createIdentity(identityName);
+  auto certificate = identity.getDefaultKey().getDefaultCertificate();
 
-  BOOST_CHECK(*store.find(certificateKey) == certificate);
+  ndn::Name certKey = certificate.getKeyName();
 
-  store.clear();
-  BOOST_REQUIRE(store.find(certificateKey) == nullptr);
+  BOOST_CHECK(certStore.find(certKey) == nullptr);
+
+  // Certificate should be retrievable from the CertificateStore
+  certStore.insert(certificate);
+  conf.loadCertToValidator(certificate);
+
+  BOOST_CHECK(certStore.find(certKey) != nullptr);
+
+  lsdb.expressInterest(certKey, 0);
+
+  advanceClocks(10_ms);
+  checkForInterest(certKey);
+}
+
+BOOST_AUTO_TEST_CASE(TestKeyPrefixRegistration)
+{
+  // check if nlsrKeyPrefix is registered
+  ndn::Name nlsrKeyPrefix = conf.getRouterPrefix();
+  nlsrKeyPrefix.append("nlsr");
+  nlsrKeyPrefix.append("KEY");
+  checkPrefixRegistered(face, nlsrKeyPrefix);
+
+  // check if routerPrefix is registered
+  ndn::Name routerKeyPrefix = conf.getRouterPrefix();
+  routerKeyPrefix.append("KEY");
+  checkPrefixRegistered(face, routerKeyPrefix);
+
+  // check if operatorKeyPrefix is registered
+  ndn::Name operatorKeyPrefix = conf.getNetwork();
+  operatorKeyPrefix.append(conf.getSiteName());
+  operatorKeyPrefix.append(std::string("%C1.Operator"));
+  checkPrefixRegistered(face, operatorKeyPrefix);
+}
+
+BOOST_AUTO_TEST_CASE(SegmentValidatedSignal)
+{
+  ndn::Name lsaInterestName("/localhop");
+  lsaInterestName.append(conf.getLsaPrefix().getSubName(1));
+  lsaInterestName.append(conf.getSiteName());
+  lsaInterestName.append(conf.getRouterName());
+  lsaInterestName.append(std::to_string(Lsa::Type::NAME));
+  lsaInterestName.appendNumber(nlsr.m_lsdb.m_sequencingManager.getNameLsaSeq() + 1);
+
+  lsdb.expressInterest(lsaInterestName, 0);
+  advanceClocks(10_ms);
+
+  checkForInterest(lsaInterestName);
+
+  ndn::Name lsaDataName(lsaInterestName);
+  lsaDataName.appendVersion();
+  lsaDataName.appendSegment(0);
+
+  ndn::Data data(lsaDataName);
+  data.setFreshnessPeriod(ndn::time::seconds(10));
+  ndn::Data dummyData;
+  data.setContent(dummyData.getContent());
+  data.setFinalBlock(lsaDataName[-1]);
+
+  // Sign data with this NLSR's key (in real it would be different NLSR)
+  m_keyChain.sign(data, conf.m_signingInfo);
+  face.put(data);
+
+  this->advanceClocks(ndn::time::milliseconds(1));
+
+  // Make NLSR validate data signed by its own key
+  conf.getValidator().validate(data,
+                               [] (const ndn::Data&) { BOOST_CHECK(true); },
+                               [] (const ndn::Data&, const ndn::security::v2::ValidationError&) {
+                                 BOOST_CHECK(false);
+                               });
+
+  lsdb.emitSegmentValidatedSignal(data);
+  const auto keyName = data.getSignature().getKeyLocator().getName();
+  BOOST_CHECK(certStore.find(keyName) != nullptr);
+
+  // testing a callback after segment validation signal from lsdb
+  ndn::util::signal::ScopedConnection connection = lsdb.afterSegmentValidatedSignal.connect(
+  [&] (const ndn::Data& lsaSegment) {
+    BOOST_CHECK_EQUAL(lsaSegment.getName(), data.getName());
+  });
 }
 
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace test
-} // namespace security
 } // namespace nlsr
diff --git a/tests/test-adjacency-list.cpp b/tests/test-adjacency-list.cpp
index 721d8f6..c1bf482 100644
--- a/tests/test-adjacency-list.cpp
+++ b/tests/test-adjacency-list.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -88,7 +88,8 @@
   adjacencies.insert(adjacencyB);
 
   ndn::util::DummyClientFace face;
-  ConfParameter conf(face);
+  ndn::KeyChain keyChain;
+  ConfParameter conf(face, keyChain);
   BOOST_CHECK(adjacencies.isAdjLsaBuildable(conf.getInterestRetryNumber()));
 }
 
@@ -108,7 +109,8 @@
   adjacencies.insert(adjacencyB);
 
   ndn::util::DummyClientFace face;
-  ConfParameter conf(face);
+  ndn::KeyChain keyChain;
+  ConfParameter conf(face, keyChain);
   conf.setInterestRetryNumber(HELLO_RETRIES_DEFAULT);
 
   BOOST_CHECK(adjacencies.isAdjLsaBuildable(conf.getInterestRetryNumber()));
@@ -130,7 +132,8 @@
   adjacencies.insert(adjacencyB);
 
   ndn::util::DummyClientFace face;
-  ConfParameter conf(face);
+  ndn::KeyChain keyChain;
+  ConfParameter conf(face, keyChain);
   conf.setInterestRetryNumber(HELLO_RETRIES_DEFAULT);
 
   BOOST_CHECK(!adjacencies.isAdjLsaBuildable(conf.getInterestRetryNumber()));
diff --git a/tests/test-common.cpp b/tests/test-common.cpp
index 11ca06d..b611390 100644
--- a/tests/test-common.cpp
+++ b/tests/test-common.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2017,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -34,6 +34,24 @@
   return data;
 }
 
+void
+checkPrefixRegistered(const ndn::util::DummyClientFace& face, const ndn::Name& prefix)
+{
+  bool registerCommandEmitted = false;
+  for (const auto& interest : face.sentInterests) {
+    if (interest.getName().size() > 4 &&
+        interest.getName().get(3) == ndn::name::Component("register")) {
+      ndn::name::Component test = interest.getName().get(4);
+      ndn::nfd::ControlParameters params(test.blockFromValue());
+      if (params.getName() == prefix) {
+        registerCommandEmitted = true;
+        break;
+      }
+    }
+  }
+  BOOST_CHECK(registerCommandEmitted);
+}
+
 MockNfdMgmtFixture::MockNfdMgmtFixture()
   : m_face(m_ioService, m_keyChain, {true, true})
 {
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index 339fd82..49238ad 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -24,9 +24,10 @@
 
 #include "common.hpp"
 #include "conf-parameter.hpp"
+#include "identity-management-fixture.hpp"
 
 #include "boost-test.hpp"
-#include "identity-management-fixture.hpp"
+#include "route/fib.hpp"
 
 #include <boost/asio.hpp>
 
@@ -45,6 +46,9 @@
 ndn::Data&
 signData(ndn::Data& data);
 
+void
+checkPrefixRegistered(const ndn::util::DummyClientFace& face, const ndn::Name& prefix);
+
 /** \brief add a fake signature to Data
  */
 inline shared_ptr<ndn::Data>
@@ -177,11 +181,13 @@
 public:
   DummyConfFileProcessor(ConfParameter& conf,
                          int32_t protocol = SYNC_PROTOCOL_PSYNC,
-                         int32_t hyperbolicState = HYPERBOLIC_STATE_OFF)
+                         int32_t hyperbolicState = HYPERBOLIC_STATE_OFF,
+                         ndn::Name networkName = "/ndn", ndn::Name siteName = "/site",
+                         ndn::Name routerName = "/%C1.Router/this-router")
   {
-    conf.setNetwork("/ndn");
-    conf.setSiteName("/site");
-    conf.setRouterName("/%C1.Router/this-router");
+    conf.setNetwork(networkName);
+    conf.setSiteName(siteName);
+    conf.setRouterName(routerName);
     conf.buildRouterAndSyncUserPrefix();
 
     conf.setSyncProtocol(protocol);
diff --git a/tests/test-conf-file-processor.cpp b/tests/test-conf-file-processor.cpp
index 8ddb6ee..bacae9f 100644
--- a/tests/test-conf-file-processor.cpp
+++ b/tests/test-conf-file-processor.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -123,7 +123,7 @@
 public:
   ConfFileProcessorFixture()
     : face(m_ioService, m_keyChain)
-    , conf(face, "unit-test-nlsr.conf")
+    , conf(face, m_keyChain, "unit-test-nlsr.conf")
   {
   }
 
@@ -401,8 +401,6 @@
 
   BOOST_CHECK(processConfigurationString(SECTION_SECURITY));
 
-  // Certificate should now be in the CertificateStore
-  BOOST_CHECK(conf.getCertStore().find(identity.getDefaultKey().getName()) != nullptr);
 }
 
 BOOST_AUTO_TEST_CASE(PrefixUpdateValidatorOptional) // Bug #2814
diff --git a/tests/test-conf-parameter.cpp b/tests/test-conf-parameter.cpp
index 4bc9c54..e45a605 100644
--- a/tests/test-conf-parameter.cpp
+++ b/tests/test-conf-parameter.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -35,7 +35,8 @@
 BOOST_AUTO_TEST_CASE(ConfParameterSettersAndGetters)
 {
   ndn::util::DummyClientFace face;
-  ConfParameter cp1(face);
+  ndn::KeyChain keyChain;
+  ConfParameter cp1(face, keyChain);
 
   const string NAME = "router1";
   const string SITE = "memphis";
diff --git a/tests/test-hyperbolic-calculator.cpp b/tests/test-hyperbolic-calculator.cpp
index 28f7323..0011ce9 100644
--- a/tests/test-hyperbolic-calculator.cpp
+++ b/tests/test-hyperbolic-calculator.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -44,7 +44,7 @@
 public:
   HyperbolicCalculatorFixture()
     : face(m_ioService, m_keyChain)
-    , conf(face)
+    , conf(face, m_keyChain)
     , nlsr(face, m_keyChain, conf)
     , routingTable(nlsr.m_routingTable)
     , adjacencies(conf.getAdjacencyList())
diff --git a/tests/test-link-state-calculator.cpp b/tests/test-link-state-calculator.cpp
index 8e1710b..2d8ee1b 100644
--- a/tests/test-link-state-calculator.cpp
+++ b/tests/test-link-state-calculator.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -43,7 +43,7 @@
 public:
   LinkStateCalculatorFixture()
     : face(m_ioService, m_keyChain)
-    , conf(face)
+    , conf(face, m_keyChain)
     , confProcessor(conf)
     , nlsr(face, m_keyChain, conf)
     , routingTable(nlsr.m_routingTable)
diff --git a/tests/test-lsa-rule.cpp b/tests/test-lsa-rule.cpp
index 56b1f5c..dffe174 100644
--- a/tests/test-lsa-rule.cpp
+++ b/tests/test-lsa-rule.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -21,6 +21,7 @@
 
 #include "test-common.hpp"
 #include "nlsr.hpp"
+#include "security/certificate-store.hpp"
 
 #include <ndn-cxx/interest.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
@@ -46,8 +47,9 @@
     , siteIdentityName("/ndn/edu/test-site")
     , opIdentityName("/ndn/edu/test-site/%C1.Operator/op1")
     , routerIdName("/ndn/edu/test-site/%C1.Router/router1")
-    , confParam(face)
-    , confProcessor(confParam)
+    , confParam(face, m_keyChain)
+    , confProcessor(confParam, SYNC_PROTOCOL_PSYNC, HYPERBOLIC_STATE_OFF,
+                    "/ndn/", "/edu/test-site", "/%C1.Router/router1")
     , nlsr(face, m_keyChain, confParam)
     , ROOT_CERT_PATH(boost::filesystem::current_path() / std::string("root.cert"))
   {
@@ -56,15 +58,16 @@
     opIdentity = addSubCertificate(opIdentityName, siteIdentity);
     routerId = addSubCertificate(routerIdName, opIdentity);
 
+    // Create certificate and load it to the validator
+    // previously this was done by in nlsr ctor
+    confParam.initializeKey();
+
     saveCertificate(rootId, ROOT_CERT_PATH.string());
 
-    auto load = [this] (const ndn::security::Identity& id) {
-      nlsr.loadCertToPublish(id.getDefaultKey().getDefaultCertificate());
-    };
-    load(rootId);
-    load(siteIdentity);
-    load(opIdentity);
-    load(routerId);
+    confParam.loadCertToValidator(rootId.getDefaultKey().getDefaultCertificate());
+    confParam.loadCertToValidator(siteIdentity.getDefaultKey().getDefaultCertificate());
+    confParam.loadCertToValidator(opIdentity.getDefaultKey().getDefaultCertificate());
+    confParam.loadCertToValidator(routerId.getDefaultKey().getDefaultCertificate());
 
     // Loading the security section's validator part into the validator
     // See conf file processor for more details
@@ -100,7 +103,6 @@
 
   ndn::Name rootIdName, siteIdentityName, opIdentityName, routerIdName;
   ndn::security::pib::Identity rootId, siteIdentity, opIdentity, routerId;
-
   ConfParameter confParam;
   DummyConfFileProcessor confProcessor;
   Nlsr nlsr;
@@ -129,7 +131,7 @@
   data.setFreshnessPeriod(ndn::time::seconds(10));
 
   // Sign data with NLSR's key
-  m_keyChain.sign(data, nlsr.m_signingInfo);
+  m_keyChain.sign(data, confParam.getSigningInfo());
 
   // Make NLSR validate data signed by its own key
   confParam.getValidator().validate(data,
diff --git a/tests/test-lsa-segment-storage.cpp b/tests/test-lsa-segment-storage.cpp
index e8f90bf..2881d88 100644
--- a/tests/test-lsa-segment-storage.cpp
+++ b/tests/test-lsa-segment-storage.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -36,7 +36,7 @@
 public:
   LsaSegmentStorageFixture()
     : face(m_ioService, m_keyChain, {true, true})
-    , conf(face)
+    , conf(face, m_keyChain)
     , confProcessor(conf)
     , nlsr(face, m_keyChain, conf)
     , lsdb(nlsr.m_lsdb)
diff --git a/tests/test-lsdb.cpp b/tests/test-lsdb.cpp
index 9bec39a..56e862b 100644
--- a/tests/test-lsdb.cpp
+++ b/tests/test-lsdb.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -41,7 +41,7 @@
 public:
   LsdbFixture()
     : face(m_ioService, m_keyChain, {true, true})
-    , conf(face)
+    , conf(face, m_keyChain)
     , confProcessor(conf)
     , nlsr(face, m_keyChain, conf)
     , lsdb(nlsr.m_lsdb)
@@ -190,7 +190,7 @@
   ndn::util::DummyClientFace face2(m_ioService, m_keyChain, {true, true});
   face.linkTo(face2);
 
-  ConfParameter conf2(face2);
+  ConfParameter conf2(face2, m_keyChain);
   std::string config = R"CONF(
               trust-anchor
                 {
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index f5ffb8e..ab69692 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -35,7 +35,7 @@
 {
 public:
   NlsrFixture()
-    : conf(m_face)
+    : conf(m_face, m_keyChain)
     , confProcessor(conf)
     , nlsr(m_face, m_keyChain, conf)
     , lsdb(nlsr.m_lsdb)
@@ -354,29 +354,6 @@
   BOOST_CHECK(rtEntry == nullptr);
 }
 
-BOOST_AUTO_TEST_CASE(GetCertificate)
-{
-  // Create certificate
-  ndn::Name identityName("/TestNLSR/identity");
-  identityName.appendVersion();
-
-  ndn::security::pib::Identity identity = m_keyChain.createIdentity(identityName);
-
-  ndn::security::v2::Certificate certificate =
-    identity.getDefaultKey().getDefaultCertificate();
-
-  const ndn::Name certKey = certificate.getKeyName();
-
-  BOOST_CHECK(nlsr.getCertificate(certKey) == nullptr);
-
-  // Certificate should be retrievable from the CertificateStore
-  nlsr.loadCertToPublish(certificate);
-
-  BOOST_CHECK(nlsr.getCertificate(certKey) != nullptr);
-
-  nlsr.getCertificateStore().clear();
-}
-
 BOOST_AUTO_TEST_CASE(BuildAdjLsaAfterHelloResponse)
 {
   // Configure NLSR
diff --git a/tests/test-statistics.cpp b/tests/test-statistics.cpp
index 83479c7..0dbe274 100644
--- a/tests/test-statistics.cpp
+++ b/tests/test-statistics.cpp
@@ -1,6 +1,6 @@
  /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -35,7 +35,7 @@
 public:
   StatisticsFixture()
     : face(m_ioService, m_keyChain)
-    , conf(face)
+    , conf(face, m_keyChain)
     , confProcessor(conf)
     , nlsr(face, m_keyChain, conf)
     , lsdb(nlsr.m_lsdb)
diff --git a/tests/update/test-advertise-crash.cpp b/tests/update/test-advertise-crash.cpp
index 7f0cad3..4e8f112 100644
--- a/tests/update/test-advertise-crash.cpp
+++ b/tests/update/test-advertise-crash.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -31,7 +31,7 @@
 public:
   AdvertiseCrashFixture()
     : face(m_ioService, m_keyChain, {true, true})
-    , conf(face)
+    , conf(face, m_keyChain)
     , confProcessor(conf)
     , nlsr(face, m_keyChain, conf)
     , namePrefixList(conf.getNamePrefixList())
diff --git a/tests/update/test-nfd-rib-command-processor.cpp b/tests/update/test-nfd-rib-command-processor.cpp
index 17485da..514fa1c 100644
--- a/tests/update/test-nfd-rib-command-processor.cpp
+++ b/tests/update/test-nfd-rib-command-processor.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -35,7 +35,7 @@
 public:
   NfdRibCommandProcessorFixture()
     : face(m_ioService, m_keyChain, {true, true})
-    , conf(face)
+    , conf(face, m_keyChain)
     , confProcessor(conf)
     , nlsr(face, m_keyChain, conf)
     , namePrefixes(conf.getNamePrefixList())
diff --git a/tests/update/test-prefix-update-processor.cpp b/tests/update/test-prefix-update-processor.cpp
index 5a6cbde..711935f 100644
--- a/tests/update/test-prefix-update-processor.cpp
+++ b/tests/update/test-prefix-update-processor.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -22,8 +22,8 @@
 #include "update/prefix-update-processor.hpp"
 #include "nlsr.hpp"
 
-#include "../control-commands.hpp"
-#include "../test-common.hpp"
+#include "tests/control-commands.hpp"
+#include "tests/test-common.hpp"
 
 #include <ndn-cxx/mgmt/nfd/control-response.hpp>
 #include <ndn-cxx/security/command-interest-signer.hpp>
@@ -46,7 +46,7 @@
     : face(m_ioService, m_keyChain, {true, true})
     , siteIdentityName(ndn::Name("site"))
     , opIdentityName(ndn::Name("site").append(ndn::Name("%C1.Operator")))
-    , conf(face)
+    , conf(face, m_keyChain)
     , confProcessor(conf)
     , nlsr(face, m_keyChain, conf)
     , namePrefixList(conf.getNamePrefixList())
@@ -59,6 +59,12 @@
     // Operator cert
     opIdentity = addSubCertificate(opIdentityName, siteIdentity);
 
+    // Create certificate and load it to the validator
+    conf.initializeKey();
+
+    conf.loadCertToValidator(siteIdentity.getDefaultKey().getDefaultCertificate());
+    conf.loadCertToValidator(opIdentity.getDefaultKey().getDefaultCertificate());
+
     std::ifstream inputFile;
     inputFile.open(std::string("nlsr.conf"));
 
@@ -78,8 +84,6 @@
     }
     inputFile.close();
 
-    nlsr.loadCertToPublish(opIdentity.getDefaultKey().getDefaultCertificate());
-
     addIdentity(conf.getRouterPrefix());
 
     // Initialize NLSR so a sync socket is created
@@ -131,7 +135,9 @@
   ndn::security::pib::Identity siteIdentity;
 
   ndn::Name opIdentityName;
+  ndn::Name routerIdName;
   ndn::security::pib::Identity opIdentity;
+  ndn::security::pib::Identity routerId;
 
   ConfParameter conf;
   DummyConfFileProcessor confProcessor;
@@ -175,7 +181,6 @@
 
   BOOST_REQUIRE_EQUAL(namePrefixList.size(), 1);
   BOOST_CHECK_EQUAL(namePrefixList.getNames().front(), parameters.getName());
-
   BOOST_CHECK(wasRoutingUpdatePublished());
   BOOST_CHECK(nameLsaSeqNoBeforeInterest < nlsr.m_lsdb.m_sequencingManager.getNameLsaSeq());
 
diff --git a/tests/update/test-save-delete-prefix.cpp b/tests/update/test-save-delete-prefix.cpp
index 10988bf..1bcca79 100644
--- a/tests/update/test-save-delete-prefix.cpp
+++ b/tests/update/test-save-delete-prefix.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2019,  The University of Memphis,
+ * Copyright (c) 2014-2020,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -22,8 +22,8 @@
 #include "update/prefix-update-processor.hpp"
 #include "nlsr.hpp"
 
-#include "../control-commands.hpp"
-#include "../test-common.hpp"
+#include "tests/control-commands.hpp"
+#include "tests/test-common.hpp"
 #include "conf-parameter.hpp"
 
 #include <ndn-cxx/mgmt/nfd/control-response.hpp>
@@ -47,7 +47,7 @@
     , siteIdentityName(ndn::Name("/edu/test-site"))
     , opIdentityName(ndn::Name("/edu/test-site").append(ndn::Name("%C1.Operator")))
     , testConfFile("/tmp/nlsr.conf.test")
-    , conf(face, testConfFile)
+    , conf(face, m_keyChain, testConfFile)
     , confProcessor(conf)
     , nlsr(face, m_keyChain, conf)
     , SITE_CERT_PATH(boost::filesystem::current_path() / std::string("site.cert"))
@@ -91,7 +91,11 @@
 
     // Operator cert
     opIdentity = addSubCertificate(opIdentityName, siteIdentity);
-    nlsr.loadCertToPublish(opIdentity.getDefaultKey().getDefaultCertificate());
+
+    // Create certificate and load it to the validator
+    conf.initializeKey();
+    conf.loadCertToValidator(siteIdentity.getDefaultKey().getDefaultCertificate());
+    conf.loadCertToValidator(opIdentity.getDefaultKey().getDefaultCertificate());
 
     // Set the network so the LSA prefix is constructed
     addIdentity(conf.getRouterPrefix());
@@ -156,8 +160,8 @@
 
 public:
   ndn::util::DummyClientFace face;
-  ndn::Name siteIdentityName;
-  ndn::security::pib::Identity siteIdentity;
+  ndn::Name siteIdentityName, routerIdName;
+  ndn::security::pib::Identity siteIdentity, routerId;
 
   ndn::Name opIdentityName;
   ndn::security::pib::Identity opIdentity;
