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);
