diff --git a/tests/communication/test-sync-logic-handler.cpp b/tests/communication/test-sync-logic-handler.cpp
index 3c71f74..b493290 100644
--- a/tests/communication/test-sync-logic-handler.cpp
+++ b/tests/communication/test-sync-logic-handler.cpp
@@ -20,11 +20,11 @@
  */
 
 #include "communication/sync-logic-handler.hpp"
-#include "tests/test-common.hpp"
-#include "common.hpp"
 #include "nlsr.hpp"
 
-#include <ndn-cxx/util/dummy-client-face.hpp>
+#include "tests/io-key-chain-fixture.hpp"
+#include "tests/test-common.hpp"
+
 #include <boost/lexical_cast.hpp>
 
 namespace nlsr {
@@ -32,7 +32,7 @@
 
 using std::shared_ptr;
 
-class SyncLogicFixture : public UnitTestTimeFixture
+class SyncLogicFixture : public IoKeyChainFixture
 {
 public:
   SyncLogicFixture()
@@ -42,7 +42,7 @@
                        this->conf.getSiteName().toUri() +
                        "/%C1.Router/other-router/")
   {
-    addIdentity(conf.getRouterPrefix());
+    m_keyChain.createIdentity(conf.getRouterPrefix());
   }
 
   void
@@ -59,16 +59,16 @@
   }
 
 public:
-  ndn::util::DummyClientFace face{m_ioService, m_keyChain};
+  ndn::util::DummyClientFace face{m_io, m_keyChain};
   ConfParameter conf{face, m_keyChain};
   DummyConfFileProcessor confProcessor{conf, SYNC_PROTOCOL_PSYNC};
   SyncLogicHandler::IsLsaNew testIsLsaNew;
   SyncLogicHandler sync;
 
   const std::string updateNamePrefix;
-  const std::vector<Lsa::Type> lsaTypes = {Lsa::Type::NAME,
-                                           Lsa::Type::ADJACENCY,
-                                           Lsa::Type::COORDINATE};
+  const std::vector<Lsa::Type> lsaTypes{Lsa::Type::NAME,
+                                        Lsa::Type::ADJACENCY,
+                                        Lsa::Type::COORDINATE};
 };
 
 BOOST_FIXTURE_TEST_SUITE(TestSyncLogicHandler, SyncLogicFixture)
diff --git a/tests/communication/test-sync-protocol-adapter.cpp b/tests/communication/test-sync-protocol-adapter.cpp
index 0266981..74d9e23 100644
--- a/tests/communication/test-sync-protocol-adapter.cpp
+++ b/tests/communication/test-sync-protocol-adapter.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis,
+ * Copyright (c) 2014-2022,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -20,24 +20,24 @@
  */
 
 #include "communication/sync-protocol-adapter.hpp"
-#include "tests/test-common.hpp"
+
+#include "tests/boost-test.hpp"
+#include "tests/io-key-chain-fixture.hpp"
 
 #include <ndn-cxx/util/dummy-client-face.hpp>
 
-#include <boost/lexical_cast.hpp>
-
 namespace nlsr {
 namespace test {
 
 using namespace ndn;
 
-class SyncProtocolAdapterFixture : public UnitTestTimeFixture
+class SyncProtocolAdapterFixture : public IoKeyChainFixture
 {
 public:
   SyncProtocolAdapterFixture()
-   : syncPrefix("/localhop/ndn/nlsr/sync/")
-   , nameLsaUserPrefix("/localhop/ndn/nlsr/LSA/NAME")
-   , syncInterestLifetime(time::seconds(60))
+    : syncPrefix("/localhop/ndn/nlsr/sync")
+    , nameLsaUserPrefix("/localhop/ndn/nlsr/LSA/NAME")
+    , syncInterestLifetime(time::seconds(60))
   {
     syncPrefix.appendVersion(4);
   }
@@ -46,14 +46,14 @@
   addNodes()
   {
     for (int i = 0; i < 2; i++) {
-      faces[i] = std::make_shared<ndn::util::DummyClientFace>(m_ioService,
-                                                              util::DummyClientFace::Options{true, true});
+      faces[i] = std::make_shared<util::DummyClientFace>(m_io,
+                                                         util::DummyClientFace::Options{true, true});
       userPrefixes[i] = Name(nameLsaUserPrefix).appendNumber(i);
       nodes[i] = std::make_shared<SyncProtocolAdapter>(*faces[i], SYNC_PROTOCOL_PSYNC, syncPrefix,
                                                        userPrefixes[i],
                                                        syncInterestLifetime,
                                                        [i, this] (const ndn::Name& updateName,
-                                                                   uint64_t highSeq) {
+                                                                  uint64_t highSeq) {
                                                          prefixToSeq[i].emplace(updateName, highSeq);
                                                        });
     }
