diff --git a/PSync/full-producer.cpp b/PSync/full-producer.cpp
index d899965..b5cf256 100644
--- a/PSync/full-producer.cpp
+++ b/PSync/full-producer.cpp
@@ -32,8 +32,9 @@
 
 NDN_LOG_INIT(psync.FullProducer);
 
-FullProducer::FullProducer(const size_t expectedNumEntries,
-                           ndn::Face& face,
+FullProducer::FullProducer(ndn::Face& face,
+                           ndn::KeyChain& keyChain,
+                           size_t expectedNumEntries,
                            const ndn::Name& syncPrefix,
                            const ndn::Name& userPrefix,
                            const UpdateCallback& onUpdateCallBack,
@@ -41,8 +42,8 @@
                            ndn::time::milliseconds syncReplyFreshness,
                            CompressionScheme ibltCompression,
                            CompressionScheme contentCompression)
-  : ProducerBase(expectedNumEntries, face, syncPrefix, userPrefix, syncReplyFreshness,
-                 ibltCompression, contentCompression)
+  : ProducerBase(face, keyChain, expectedNumEntries, syncPrefix, userPrefix,
+                 syncReplyFreshness, ibltCompression, contentCompression)
   , m_syncInterestLifetime(syncInterestLifetime)
   , m_onUpdate(onUpdateCallBack)
   , m_jitter(100, 500)
diff --git a/PSync/full-producer.hpp b/PSync/full-producer.hpp
index d660b66..205a89c 100644
--- a/PSync/full-producer.hpp
+++ b/PSync/full-producer.hpp
@@ -42,12 +42,13 @@
 {
 public:
   /**
-   * @brief constructor
+   * @brief Constructor
    *
-   * Registers syncPrefix in NFD and sends a sync interest
+   * Registers syncPrefix in NFD and sends a sync interest.
    *
-   * @param expectedNumEntries expected entries in IBF
-   * @param face application's face
+   * @param face Application's face
+   * @param keyChain KeyChain instance to use for signing
+   * @param expectedNumEntries Expected number of entries in IBF
    * @param syncPrefix The prefix of the sync group
    * @param userPrefix The prefix of the first user in the group
    * @param onUpdateCallBack The call back to be called when there is new data
@@ -56,8 +57,9 @@
    * @param ibltCompression Compression scheme to use for IBF
    * @param contentCompression Compression scheme to use for Data content
    */
-  FullProducer(size_t expectedNumEntries,
-               ndn::Face& face,
+  FullProducer(ndn::Face& face,
+               ndn::KeyChain& keyChain,
+               size_t expectedNumEntries,
                const ndn::Name& syncPrefix,
                const ndn::Name& userPrefix,
                const UpdateCallback& onUpdateCallBack,
diff --git a/PSync/partial-producer.cpp b/PSync/partial-producer.cpp
index 5b02903..b76658a 100644
--- a/PSync/partial-producer.cpp
+++ b/PSync/partial-producer.cpp
@@ -32,16 +32,17 @@
 const ndn::name::Component HELLO{"hello"};
 const ndn::name::Component SYNC{"sync"};
 
-PartialProducer::PartialProducer(size_t expectedNumEntries,
-                                 ndn::Face& face,
+PartialProducer::PartialProducer(ndn::Face& face,
+                                 ndn::KeyChain& keyChain,
+                                 size_t expectedNumEntries,
                                  const ndn::Name& syncPrefix,
                                  const ndn::Name& userPrefix,
                                  ndn::time::milliseconds helloReplyFreshness,
                                  ndn::time::milliseconds syncReplyFreshness,
                                  CompressionScheme ibltCompression)
- : ProducerBase(expectedNumEntries, face, syncPrefix,
-                userPrefix, syncReplyFreshness, ibltCompression)
- , m_helloReplyFreshness(helloReplyFreshness)
+  : ProducerBase(face, keyChain, expectedNumEntries, syncPrefix, userPrefix,
+                 syncReplyFreshness, ibltCompression, CompressionScheme::NONE)
+  , m_helloReplyFreshness(helloReplyFreshness)
 {
   m_registeredPrefix = m_face.registerPrefix(m_syncPrefix,
     [this] (const ndn::Name& syncPrefix) {
diff --git a/PSync/partial-producer.hpp b/PSync/partial-producer.hpp
index 48ff01e..0a29cb1 100644
--- a/PSync/partial-producer.hpp
+++ b/PSync/partial-producer.hpp
@@ -43,21 +43,23 @@
 {
 public:
   /**
-   * @brief constructor
+   * @brief Constructor
    *
    * Registers syncPrefix in NFD and sets internal filters for
-   * "sync" and "hello" under syncPrefix
+   * "sync" and "hello" under syncPrefix.
    *
-   * @param expectedNumEntries expected entries in IBF
-   * @param face application's face
+   * @param face Application's face
+   * @param keyChain KeyChain instance to use for signing
+   * @param expectedNumEntries Expected number of entries in IBF
    * @param syncPrefix The prefix of the sync group
    * @param userPrefix The prefix of the first user in the group
    * @param syncReplyFreshness freshness of sync data
    * @param helloReplyFreshness freshness of hello data
    * @param ibltCompression Compression scheme to use for IBF
    */
-  PartialProducer(size_t expectedNumEntries,
-                  ndn::Face& face,
+  PartialProducer(ndn::Face& face,
+                  ndn::KeyChain& keyChain,
+                  size_t expectedNumEntries,
                   const ndn::Name& syncPrefix,
                   const ndn::Name& userPrefix,
                   ndn::time::milliseconds helloReplyFreshness = HELLO_REPLY_FRESHNESS,
diff --git a/PSync/producer-base.cpp b/PSync/producer-base.cpp
index ff6870d..d350a69 100644
--- a/PSync/producer-base.cpp
+++ b/PSync/producer-base.cpp
@@ -30,23 +30,25 @@
 
 NDN_LOG_INIT(psync.ProducerBase);
 
-ProducerBase::ProducerBase(size_t expectedNumEntries,
-                           ndn::Face& face,
+ProducerBase::ProducerBase(ndn::Face& face,
+                           ndn::KeyChain& keyChain,
+                           size_t expectedNumEntries,
                            const ndn::Name& syncPrefix,
                            const ndn::Name& userPrefix,
                            ndn::time::milliseconds syncReplyFreshness,
                            CompressionScheme ibltCompression,
                            CompressionScheme contentCompression)
-  : m_iblt(expectedNumEntries, ibltCompression)
+  : m_face(face)
+  , m_keyChain(keyChain)
+  , m_scheduler(m_face.getIoService())
+  , m_rng(ndn::random::getRandomNumberEngine())
+  , m_iblt(expectedNumEntries, ibltCompression)
+  , m_segmentPublisher(m_face, m_keyChain)
   , m_expectedNumEntries(expectedNumEntries)
   , m_threshold(expectedNumEntries / 2)
-  , m_face(face)
-  , m_scheduler(m_face.getIoService())
   , m_syncPrefix(syncPrefix)
   , m_userPrefix(userPrefix)
   , m_syncReplyFreshness(syncReplyFreshness)
-  , m_segmentPublisher(m_face, m_keyChain)
-  , m_rng(ndn::random::getRandomNumberEngine())
   , m_ibltCompression(ibltCompression)
   , m_contentCompression(contentCompression)
 {
diff --git a/PSync/producer-base.hpp b/PSync/producer-base.hpp
index 29e682d..e810111 100644
--- a/PSync/producer-base.hpp
+++ b/PSync/producer-base.hpp
@@ -56,23 +56,26 @@
 
 PSYNC_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /**
-   * @brief constructor
+   * @brief Constructor
    *
-   * @param expectedNumEntries expected number entries in IBF
-   * @param face application's face
+   * @param face Application's face
+   * @param keyChain KeyChain instance to use for signing
+   * @param expectedNumEntries Expected number of entries in IBF
    * @param syncPrefix The prefix of the sync group
    * @param userPrefix The prefix of the first user in the group
-   * @param syncReplyFreshness freshness of sync data
+   * @param syncReplyFreshness FreshnessPeriod of sync data
    * @param ibltCompression Compression scheme to use for IBF
    * @param contentCompression Compression scheme to use for Data content
    */
-  ProducerBase(size_t expectedNumEntries,
-               ndn::Face& face,
+  ProducerBase(ndn::Face& face,
+               ndn::KeyChain& keyChain,
+               size_t expectedNumEntries,
                const ndn::Name& syncPrefix,
                const ndn::Name& userPrefix,
                ndn::time::milliseconds syncReplyFreshness = SYNC_REPLY_FRESHNESS,
                CompressionScheme ibltCompression = CompressionScheme::NONE,
                CompressionScheme contentCompression = CompressionScheme::NONE);
+
 public:
   /**
    * @brief Returns the current sequence number of the given prefix
@@ -152,11 +155,12 @@
   onRegisterFailed(const ndn::Name& prefix, const std::string& msg) const;
 
 PSYNC_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
+  ndn::Face& m_face;
+  ndn::KeyChain& m_keyChain;
+  ndn::Scheduler m_scheduler;
+  ndn::random::RandomNumberEngine& m_rng;
+
   detail::IBLT m_iblt;
-  uint32_t m_expectedNumEntries;
-  // Threshold is used check if the differences are greater
-  // than it and whether we need to update the other side.
-  uint32_t m_threshold;
 
   // prefix and sequence number
   std::map<ndn::Name, uint64_t> m_prefixes;
@@ -165,20 +169,17 @@
                                   bm::unordered_set_of<ndn::Name, std::hash<ndn::Name>>>;
   HashNameBiMap m_biMap;
 
-  ndn::Face& m_face;
-  ndn::KeyChain m_keyChain;
-  ndn::Scheduler m_scheduler;
-
-  ndn::Name m_syncPrefix;
-  ndn::Name m_userPrefix;
-
-  ndn::time::milliseconds m_syncReplyFreshness;
-
   SegmentPublisher m_segmentPublisher;
 
-  ndn::random::RandomNumberEngine& m_rng;
-  CompressionScheme m_ibltCompression;
-  CompressionScheme m_contentCompression;
+  const size_t m_expectedNumEntries;
+  // Threshold is used check if the differences are greater
+  // than it and whether we need to update the other side.
+  const size_t m_threshold;
+  const ndn::Name m_syncPrefix;
+  const ndn::Name m_userPrefix;
+  const ndn::time::milliseconds m_syncReplyFreshness;
+  const CompressionScheme m_ibltCompression;
+  const CompressionScheme m_contentCompression;
 };
 
 } // namespace psync
diff --git a/examples/full-sync.cpp b/examples/full-sync.cpp
index 01da1dd..3ed9814 100644
--- a/examples/full-sync.cpp
+++ b/examples/full-sync.cpp
@@ -20,6 +20,7 @@
 #include <PSync/full-producer.hpp>
 
 #include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/util/logger.hpp>
 #include <ndn-cxx/util/random.hpp>
 #include <ndn-cxx/util/scheduler.hpp>
@@ -42,17 +43,15 @@
    */
   Producer(const ndn::Name& syncPrefix, const std::string& userPrefix,
            int numDataStreams, int maxNumPublish)
-    : m_scheduler(m_face.getIoService())
-    , m_fullProducer(80, m_face, syncPrefix, userPrefix,
+    : m_fullProducer(m_face, m_keyChain, 80, syncPrefix, userPrefix,
                      std::bind(&Producer::processSyncUpdate, this, _1),
                      1600_ms, 1600_ms)
-    , m_numDataStreams(numDataStreams)
     , m_maxNumPublish(maxNumPublish)
     , m_rng(ndn::random::getRandomNumberEngine())
     , m_rangeUniformRandom(0, 60000)
   {
     // Add user prefixes and schedule updates for them in specified interval
-    for (int i = 0; i < m_numDataStreams; i++) {
+    for (int i = 0; i < numDataStreams; i++) {
       ndn::Name prefix(userPrefix + "-" + std::to_string(i));
       m_fullProducer.addUserNode(prefix);
       m_scheduler.schedule(ndn::time::milliseconds(m_rangeUniformRandom(m_rng)),
@@ -93,11 +92,10 @@
 
 private:
   ndn::Face m_face;
-  ndn::Scheduler m_scheduler;
+  ndn::KeyChain m_keyChain;
+  ndn::Scheduler m_scheduler{m_face.getIoService()};
 
   psync::FullProducer m_fullProducer;
-
-  int m_numDataStreams;
   uint64_t m_maxNumPublish;
 
   ndn::random::RandomNumberEngine& m_rng;
diff --git a/examples/producer.cpp b/examples/producer.cpp
index a6f4ca1..4e4c77a 100644
--- a/examples/producer.cpp
+++ b/examples/producer.cpp
@@ -20,6 +20,7 @@
 #include <PSync/partial-producer.hpp>
 
 #include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/util/logger.hpp>
 #include <ndn-cxx/util/random.hpp>
 #include <ndn-cxx/util/scheduler.hpp>
@@ -37,16 +38,14 @@
    * IBF size is set to 40 in m_producer as the expected number of update to IBF in a sync cycle
    */
   PSyncPartialProducer(const ndn::Name& syncPrefix, const std::string& userPrefix,
-                       int nDataStreams, int maxNumPublish)
-    : m_scheduler(m_face.getIoService())
-    , m_producer(40, m_face, syncPrefix, userPrefix + "-0")
-    , m_nDataStreams(nDataStreams)
+                       int numDataStreams, int maxNumPublish)
+    : m_producer(m_face, m_keyChain, 40, syncPrefix, userPrefix + "-0")
     , m_maxNumPublish(maxNumPublish)
     , m_rng(ndn::random::getRandomNumberEngine())
     , m_rangeUniformRandom(0, 60000)
   {
     // Add user prefixes and schedule updates for them
-    for (int i = 0; i < m_nDataStreams; i++) {
+    for (int i = 0; i < numDataStreams; i++) {
       ndn::Name updateName(userPrefix + "-" + std::to_string(i));
 
       // Add the user prefix to the producer
@@ -84,11 +83,10 @@
 
 private:
   ndn::Face m_face;
-  ndn::Scheduler m_scheduler;
+  ndn::KeyChain m_keyChain;
+  ndn::Scheduler m_scheduler{m_face.getIoService()};
 
   psync::PartialProducer m_producer;
-
-  int m_nDataStreams;
   uint64_t m_maxNumPublish;
 
   ndn::random::RandomNumberEngine& m_rng;
diff --git a/tests/clock-fixture.cpp b/tests/clock-fixture.cpp
index d47f695..e900f16 100644
--- a/tests/clock-fixture.cpp
+++ b/tests/clock-fixture.cpp
@@ -19,11 +19,11 @@
 
 #include "tests/clock-fixture.hpp"
 
-namespace ndn::tests {
+namespace psync::tests {
 
 ClockFixture::ClockFixture()
-  : m_steadyClock(make_shared<time::UnitTestSteadyClock>())
-  , m_systemClock(make_shared<time::UnitTestSystemClock>())
+  : m_steadyClock(std::make_shared<time::UnitTestSteadyClock>())
+  , m_systemClock(std::make_shared<time::UnitTestSystemClock>())
 {
   time::setCustomClocks(m_steadyClock, m_systemClock);
 }
@@ -49,4 +49,4 @@
   }
 }
 
-} // namespace ndn::tests
+} // namespace psync::tests
diff --git a/tests/clock-fixture.hpp b/tests/clock-fixture.hpp
index 6f79950..8523041 100644
--- a/tests/clock-fixture.hpp
+++ b/tests/clock-fixture.hpp
@@ -22,7 +22,9 @@
 
 #include <ndn-cxx/util/time-unit-test-clock.hpp>
 
-namespace ndn::tests {
+namespace psync::tests {
+
+namespace time = ndn::time;
 
 /** \brief A test fixture that overrides steady clock and system clock.
  */
@@ -72,10 +74,10 @@
   }
 
 protected:
-  shared_ptr<time::UnitTestSteadyClock> m_steadyClock;
-  shared_ptr<time::UnitTestSystemClock> m_systemClock;
+  std::shared_ptr<time::UnitTestSteadyClock> m_steadyClock;
+  std::shared_ptr<time::UnitTestSystemClock> m_systemClock;
 };
 
-} // namespace ndn::tests
+} // namespace psync::tests
 
 #endif // PSYNC_TESTS_CLOCK_FIXTURE_HPP
diff --git a/tests/io-fixture.hpp b/tests/io-fixture.hpp
index cdd2713..20d3e5b 100644
--- a/tests/io-fixture.hpp
+++ b/tests/io-fixture.hpp
@@ -24,7 +24,7 @@
 
 #include <boost/asio/io_service.hpp>
 
-namespace ndn::tests {
+namespace psync::tests {
 
 class IoFixture : public ClockFixture
 {
@@ -46,6 +46,6 @@
   boost::asio::io_service m_io;
 };
 
-} // namespace ndn::tests
+} // namespace psync::tests
 
 #endif // PSYNC_TESTS_IO_FIXTURE_HPP
diff --git a/tests/key-chain-fixture.hpp b/tests/key-chain-fixture.hpp
new file mode 100644
index 0000000..bdd705a
--- /dev/null
+++ b/tests/key-chain-fixture.hpp
@@ -0,0 +1,37 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2013-2022 Regents of the University of California.
+ *
+ * This file is part of PSync.
+ *
+ * PSync is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU Lesser General Public License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * PSync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along with
+ * PSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PSYNC_TESTS_KEY_CHAIN_FIXTURE_HPP
+#define PSYNC_TESTS_KEY_CHAIN_FIXTURE_HPP
+
+#include <ndn-cxx/security/key-chain.hpp>
+
+namespace psync::tests {
+
+/**
+ * @brief A fixture providing an in-memory KeyChain.
+ */
+class KeyChainFixture
+{
+protected:
+  ndn::KeyChain m_keyChain{"pib-memory:", "tpm-memory:"};
+};
+
+} // namespace psync::tests
+
+#endif // PSYNC_TESTS_KEY_CHAIN_FIXTURE_HPP
diff --git a/tests/test-full-producer.cpp b/tests/test-full-producer.cpp
index 1ea3119..7218e6b 100644
--- a/tests/test-full-producer.cpp
+++ b/tests/test-full-producer.cpp
@@ -22,55 +22,50 @@
 
 #include "tests/boost-test.hpp"
 #include "tests/io-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
 
-#include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
 namespace psync {
 
 using namespace ndn;
 
-BOOST_AUTO_TEST_SUITE(TestFullProducer)
-
-BOOST_AUTO_TEST_CASE(Constructor)
+class FullProducerFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
-  util::DummyClientFace face({true, true});
-  BOOST_CHECK_NO_THROW(FullProducer(40, face, Name("/psync"), Name("/testUser"), nullptr));
-}
+protected:
+  util::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
+};
+
+BOOST_FIXTURE_TEST_SUITE(TestFullProducer, FullProducerFixture)
 
 BOOST_AUTO_TEST_CASE(OnInterest)
 {
   Name syncPrefix("/psync"), userNode("/testUser");
-  util::DummyClientFace face({true, true});
-
-  FullProducer node(40, face, syncPrefix, userNode, nullptr);
+  FullProducer node(m_face, m_keyChain, 40, syncPrefix, userNode, nullptr);
 
   Name syncInterestName(syncPrefix);
   syncInterestName.append("malicious-IBF");
 
-  BOOST_REQUIRE_NO_THROW(node.onSyncInterest(syncPrefix, Interest(syncInterestName)));
+  BOOST_CHECK_NO_THROW(node.onSyncInterest(syncPrefix, Interest(syncInterestName)));
 }
 
-BOOST_FIXTURE_TEST_CASE(ConstantTimeoutForFirstSegment, tests::IoFixture)
+BOOST_AUTO_TEST_CASE(ConstantTimeoutForFirstSegment)
 {
   Name syncPrefix("/psync"), userNode("/testUser");
-  util::DummyClientFace face(m_io, {true, true});
+  FullProducer node(m_face, m_keyChain, 40, syncPrefix, userNode, nullptr, 8_s);
 
-  FullProducer node(40, face, syncPrefix, userNode, nullptr, 8_s);
   advanceClocks(10_ms);
-  face.sentInterests.clear();
+  m_face.sentInterests.clear();
 
   // full sync sends the next one in interest lifetime / 2 +- jitter
   advanceClocks(6_s);
-  BOOST_CHECK_EQUAL(face.sentInterests.size(), 1);
+  BOOST_CHECK_EQUAL(m_face.sentInterests.size(), 1);
 }
 
 BOOST_AUTO_TEST_CASE(OnSyncDataDecodeFailure)
 {
   Name syncPrefix("/psync"), userNode("/testUser");
-  util::DummyClientFace face({true, true});
-
-  FullProducer node(40, face, syncPrefix, userNode, nullptr);
+  FullProducer node(m_face, m_keyChain, 40, syncPrefix, userNode, nullptr);
 
   Name syncInterestName(syncPrefix);
   node.m_iblt.appendToName(syncInterestName);
diff --git a/tests/test-full-sync.cpp b/tests/test-full-sync.cpp
index 16ba4bc..81a4aef 100644
--- a/tests/test-full-sync.cpp
+++ b/tests/test-full-sync.cpp
@@ -24,24 +24,26 @@
 
 #include "tests/boost-test.hpp"
 #include "tests/io-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
 
+#include <array>
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
 namespace psync {
 
-using ndn::Name;
-using ndn::util::DummyClientFace;
+using namespace ndn;
 
-class FullSyncFixture : public ndn::tests::IoFixture
+class FullSyncFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
 protected:
   void
   addNode(int id)
   {
     BOOST_ASSERT(id >= 0 && id < MAX_NODES);
-    faces[id] = std::make_shared<DummyClientFace>(m_io, DummyClientFace::Options{true, true});
     userPrefixes[id] = "/userPrefix" + std::to_string(id);
-    nodes[id] = std::make_shared<FullProducer>(40, *faces[id], syncPrefix, userPrefixes[id],
+    faces[id] = std::make_shared<util::DummyClientFace>(m_io, m_keyChain,
+                                                        util::DummyClientFace::Options{true, true});
+    nodes[id] = std::make_shared<FullProducer>(*faces[id], m_keyChain, 40, syncPrefix, userPrefixes[id],
                                                [] (const auto&) {});
   }
 
@@ -170,8 +172,8 @@
 protected:
   const Name syncPrefix = "/psync";
   static constexpr int MAX_NODES = 4;
-  std::array<std::shared_ptr<DummyClientFace>, MAX_NODES> faces;
   std::array<Name, MAX_NODES> userPrefixes;
+  std::array<std::shared_ptr<util::DummyClientFace>, MAX_NODES> faces;
   std::array<std::shared_ptr<FullProducer>, MAX_NODES> nodes;
   static constexpr uint64_t NOT_EXIST = std::numeric_limits<uint64_t>::max();
 };
diff --git a/tests/test-partial-producer.cpp b/tests/test-partial-producer.cpp
index bfbcc12..3f2ab95 100644
--- a/tests/test-partial-producer.cpp
+++ b/tests/test-partial-producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -20,8 +20,8 @@
 #include "PSync/partial-producer.hpp"
 
 #include "tests/boost-test.hpp"
+#include "tests/key-chain-fixture.hpp"
 
-#include <ndn-cxx/name.hpp>
 #include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
@@ -29,24 +29,23 @@
 
 using namespace ndn;
 
-BOOST_AUTO_TEST_SUITE(TestPartialProducer)
-
-BOOST_AUTO_TEST_CASE(Constructor)
+class PartialProducerFixture : public tests::KeyChainFixture
 {
-  util::DummyClientFace face({true, true});
-  BOOST_CHECK_NO_THROW(PartialProducer(40, face, Name("/psync"), Name("/testUser")));
-}
+protected:
+  util::DummyClientFace m_face{m_keyChain, {true, true}};
+};
+
+BOOST_FIXTURE_TEST_SUITE(TestPartialProducer, PartialProducerFixture)
 
 BOOST_AUTO_TEST_CASE(RegisterPrefix)
 {
   Name syncPrefix("/psync"), userNode("/testUser");
-  util::DummyClientFace face({true, true});
-  PartialProducer producer(40, face, syncPrefix, userNode);
+  PartialProducer producer(m_face, m_keyChain, 40, syncPrefix, userNode);
 
-  face.processEvents(-1_ms);
+  m_face.processEvents(-1_ms);
 
-  BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
-  auto interest = face.sentInterests.front();
+  BOOST_REQUIRE_EQUAL(m_face.sentInterests.size(), 1);
+  auto interest = m_face.sentInterests.front();
   BOOST_CHECK_EQUAL(interest.getName().at(3), name::Component("register"));
   nfd::ControlParameters params(interest.getName().at(4).blockFromValue());
   BOOST_CHECK_EQUAL(params.getName(), syncPrefix);
@@ -55,8 +54,7 @@
 BOOST_AUTO_TEST_CASE(PublishName)
 {
   Name syncPrefix("/psync"), userNode("/testUser"), nonUser("/testUser2");
-  util::DummyClientFace face({true, true});
-  PartialProducer producer(40, face, syncPrefix, userNode);
+  PartialProducer producer(m_face, m_keyChain, 40, syncPrefix, userNode);
 
   BOOST_CHECK_EQUAL(producer.getSeqNo(userNode).value_or(-1), 0);
   producer.publishName(userNode);
@@ -75,8 +73,7 @@
 BOOST_AUTO_TEST_CASE(SameSyncInterest)
 {
   Name syncPrefix("/psync"), userNode("/testUser");
-  util::DummyClientFace face({true, true});
-  PartialProducer producer(40, face, syncPrefix, userNode);
+  PartialProducer producer(m_face, m_keyChain, 40, syncPrefix, userNode);
 
   Name syncInterestName(syncPrefix);
   syncInterestName.append("sync");
@@ -91,29 +88,28 @@
   syncInterest.setInterestLifetime(1_s);
   syncInterest.setNonce(1);
   BOOST_CHECK_NO_THROW(producer.onSyncInterest(syncInterestPrefix, syncInterest));
-  face.processEvents(10_ms);
+  m_face.processEvents(10_ms);
   BOOST_CHECK_EQUAL(producer.m_pendingEntries.size(), 1);
 
-  face.processEvents(500_ms);
+  m_face.processEvents(500_ms);
 
   // Same interest again - size of pending interest should remain same, but expirationEvent should change
   syncInterest.setNonce(2);
   BOOST_CHECK_NO_THROW(producer.onSyncInterest(syncInterestPrefix, syncInterest));
-  face.processEvents(10_ms);
+  m_face.processEvents(10_ms);
   BOOST_CHECK_EQUAL(producer.m_pendingEntries.size(), 1);
 
-  face.processEvents(500_ms);
+  m_face.processEvents(500_ms);
   BOOST_CHECK_EQUAL(producer.m_pendingEntries.size(), 1);
 
-  face.processEvents(500_ms);
+  m_face.processEvents(500_ms);
   BOOST_CHECK_EQUAL(producer.m_pendingEntries.size(), 0);
 }
 
 BOOST_AUTO_TEST_CASE(OnSyncInterest)
 {
   Name syncPrefix("/psync"), userNode("/testUser");
-  util::DummyClientFace face({true, true});
-  PartialProducer producer(40, face, syncPrefix, userNode);
+  PartialProducer producer(m_face, m_keyChain, 40, syncPrefix, userNode);
 
   // Sync interest with no bloom filter attached
   Name syncInterestName(syncPrefix);
diff --git a/tests/test-partial-sync.cpp b/tests/test-partial-sync.cpp
index 7353c5e..d7a0b4f 100644
--- a/tests/test-partial-sync.cpp
+++ b/tests/test-partial-sync.cpp
@@ -22,6 +22,7 @@
 
 #include "tests/boost-test.hpp"
 #include "tests/io-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
 
 #include <ndn-cxx/name.hpp>
 #include <ndn-cxx/util/dummy-client-face.hpp>
@@ -30,12 +31,12 @@
 
 using namespace ndn;
 
-class PartialSyncFixture : public tests::IoFixture
+class PartialSyncFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
 public:
   PartialSyncFixture()
   {
-    producer = make_shared<PartialProducer>(40, face, syncPrefix, userPrefix);
+    producer = make_shared<PartialProducer>(face, m_keyChain, 40, syncPrefix, userPrefix);
     addUserNodes("testUser", 10);
   }
 
@@ -51,9 +52,8 @@
   void
   addConsumer(int id, const std::vector<std::string>& subscribeTo, bool linkToProducer = true)
   {
-    consumerFaces[id] =
-        std::make_shared<util::DummyClientFace>(m_io, util::DummyClientFace::Options{true, true});
-
+    consumerFaces[id] = std::make_shared<util::DummyClientFace>(m_io, m_keyChain,
+                                                                util::DummyClientFace::Options{true, true});
     if (linkToProducer) {
       face.linkTo(*consumerFaces[id]);
     }
@@ -131,7 +131,8 @@
     producer->updateSeqNo(prefix, seq);
   }
 
-  util::DummyClientFace face{m_io, {true, true}};
+protected:
+  util::DummyClientFace face{m_io, m_keyChain, {true, true}};
   Name syncPrefix{"psync"};
   Name userPrefix{"testUser-0"};
 
@@ -288,8 +289,8 @@
   // Link to first producer goes down
   face.unlink();
 
-  util::DummyClientFace face2(m_io, {true, true});
-  PartialProducer replicatedProducer(40, face2, syncPrefix, userPrefix);
+  util::DummyClientFace face2(m_io, m_keyChain, {true, true});
+  PartialProducer replicatedProducer(face2, m_keyChain, 40, syncPrefix, userPrefix);
   for (int i = 1; i < 10; i++) {
       replicatedProducer.addUserNode("testUser-" + std::to_string(i));
   }
diff --git a/tests/test-producer-base.cpp b/tests/test-producer-base.cpp
index deab560..67d4aa2 100644
--- a/tests/test-producer-base.cpp
+++ b/tests/test-producer-base.cpp
@@ -20,28 +20,27 @@
 #include "PSync/producer-base.hpp"
 
 #include "tests/boost-test.hpp"
+#include "tests/key-chain-fixture.hpp"
 
-#include <ndn-cxx/data.hpp>
-#include <ndn-cxx/interest.hpp>
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
 namespace psync {
 
 using namespace ndn;
 
-BOOST_AUTO_TEST_SUITE(TestProducerBase)
-
-BOOST_AUTO_TEST_CASE(Constructor)
+class ProducerBaseFixture : public tests::KeyChainFixture
 {
-  util::DummyClientFace face;
-  BOOST_CHECK_NO_THROW(ProducerBase(40, face, Name("/psync"), Name("/testUser")));
-}
+protected:
+  util::DummyClientFace m_face;
+};
+
+BOOST_FIXTURE_TEST_SUITE(TestProducerBase, ProducerBaseFixture)
 
 BOOST_AUTO_TEST_CASE(Basic)
 {
-  util::DummyClientFace face;
   Name userNode("/testUser");
-  ProducerBase producerBase(40, face, Name("/psync"), userNode);
+  ProducerBase producerBase(m_face, m_keyChain, 40, Name("/psync"), userNode);
+
   // Hash table size should be 40 + 40/2 = 60 (which is perfectly divisible by N_HASH = 3)
   BOOST_CHECK_EQUAL(producerBase.m_iblt.getHashTable().size(), 60);
   BOOST_CHECK_EQUAL(producerBase.getSeqNo(userNode).value(), 0);
@@ -67,16 +66,14 @@
 
 BOOST_AUTO_TEST_CASE(ApplicationNack)
 {
-  util::DummyClientFace face;
-  ProducerBase producerBase(40, face, Name("/psync"), Name("/testUser"));
+  ProducerBase producerBase(m_face, m_keyChain, 40, Name("/psync"), Name("/testUser"));
 
-  BOOST_CHECK_EQUAL(face.sentData.size(), 0);
-  producerBase.m_syncReplyFreshness = 1_s;
+  BOOST_CHECK_EQUAL(m_face.sentData.size(), 0);
   producerBase.sendApplicationNack(Name("test"));
-  face.processEvents(10_ms);
+  m_face.processEvents(10_ms);
 
-  BOOST_REQUIRE_EQUAL(face.sentData.size(), 1);
-  BOOST_CHECK_EQUAL(face.sentData.front().getContentType(), tlv::ContentType_Nack);
+  BOOST_REQUIRE_EQUAL(m_face.sentData.size(), 1);
+  BOOST_CHECK_EQUAL(m_face.sentData.front().getContentType(), tlv::ContentType_Nack);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/test-segment-publisher.cpp b/tests/test-segment-publisher.cpp
index 4874c49..bccaee1 100644
--- a/tests/test-segment-publisher.cpp
+++ b/tests/test-segment-publisher.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -22,9 +22,8 @@
 
 #include "tests/boost-test.hpp"
 #include "tests/io-fixture.hpp"
+#include "tests/key-chain-fixture.hpp"
 
-#include <ndn-cxx/data.hpp>
-#include <ndn-cxx/interest.hpp>
 #include <ndn-cxx/security/validator-null.hpp>
 #include <ndn-cxx/util/dummy-client-face.hpp>
 #include <ndn-cxx/util/segment-fetcher.hpp>
@@ -33,16 +32,14 @@
 
 using namespace ndn;
 
-class SegmentPublisherFixture : public tests::IoFixture
+class SegmentPublisherFixture : public tests::IoFixture, public tests::KeyChainFixture
 {
-public:
+protected:
   SegmentPublisherFixture()
-    : face(m_io, util::DummyClientFace::Options{true, true})
-    , publisher(face, keyChain)
   {
-    face.setInterestFilter(InterestFilter("/hello/world"),
-                           bind(&SegmentPublisherFixture::onInterest, this, _1, _2),
-                           [] (auto&&...) { BOOST_CHECK(false); });
+    m_face.setInterestFilter(InterestFilter("/hello/world"),
+                             bind(&SegmentPublisherFixture::onInterest, this, _1, _2),
+                             [] (auto&&...) { BOOST_CHECK(false); });
     advanceClocks(10_ms);
 
     for (int i = 0; i < 1000; ++i) {
@@ -58,7 +55,7 @@
   void
   expressInterest(const Interest& interest)
   {
-    fetcher = util::SegmentFetcher::start(face, interest, security::getAcceptAllValidator());
+    fetcher = util::SegmentFetcher::start(m_face, interest, security::getAcceptAllValidator());
     fetcher->onComplete.connect([this] (auto&&...) { numComplete++; });
     fetcher->onError.connect([] (auto&&...) { BOOST_CHECK(false); });
 
@@ -82,16 +79,17 @@
     }
   }
 
-  util::DummyClientFace face;
-  KeyChain keyChain;
-  SegmentPublisher publisher;
+protected:
+  util::DummyClientFace m_face{m_io, m_keyChain, {true, true}};
+  SegmentPublisher publisher{m_face, m_keyChain};
   shared_ptr<util::SegmentFetcher> fetcher;
   Name dataName;
-  time::milliseconds freshness = 1_s;
   detail::State state;
 
   int numComplete = 0;
   int numRepliesFromStore = 0;
+
+  static constexpr time::milliseconds freshness = 1_s;
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestSegmentPublisher, SegmentPublisherFixture)
@@ -120,10 +118,10 @@
   BOOST_CHECK_EQUAL(numRepliesFromStore, 2);
 
   numRepliesFromStore = 0;
-  face.expressInterest(Interest("/hello/world/").setCanBePrefix(true),
-                       [this] (auto&&...) { this->numComplete++; },
-                       [] (auto&&...) { BOOST_CHECK(false); },
-                       [] (auto&&...) { BOOST_CHECK(false); });
+  m_face.expressInterest(Interest("/hello/world/").setCanBePrefix(true),
+                         [this] (auto&&...) { this->numComplete++; },
+                         [] (auto&&...) { BOOST_CHECK(false); },
+                         [] (auto&&...) { BOOST_CHECK(false); });
   advanceClocks(10_ms);
   BOOST_CHECK_EQUAL(numComplete, 4);
   BOOST_CHECK_EQUAL(numRepliesFromStore, 1);
