diff --git a/tests/integrated/command-fixture.cpp b/tests/integrated/command-fixture.cpp
deleted file mode 100644
index 28990e3..0000000
--- a/tests/integrated/command-fixture.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2014-2022, Regents of the University of California.
- *
- * This file is part of NDN repo-ng (Next generation of NDN repository).
- * See AUTHORS.md for complete list of repo-ng authors and contributors.
- *
- * repo-ng is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * repo-ng 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * repo-ng, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "command-fixture.hpp"
-
-namespace repo::tests {
-
-CommandFixture::CommandFixture()
-  : scheduler(repoFace.getIoService())
-  , keyChain(m_keyChain)
-  , dispatcher(repoFace, keyChain)
-  , validator(repoFace)
-{
-  this->addIdentity("/ndn/test/repo");
-  this->saveIdentityCertificate("/ndn/test/repo", "tests/integrated/insert-delete-test.cert");
-  validator.load("tests/integrated/insert-delete-validator-config.conf");
-}
-
-} // namespace repo::tests
diff --git a/tests/integrated/command-fixture.hpp b/tests/integrated/command-fixture.hpp
index 6d4aa44..507a9f1 100644
--- a/tests/integrated/command-fixture.hpp
+++ b/tests/integrated/command-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022, Regents of the University of California.
+ * Copyright (c) 2014-2023, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -30,15 +30,19 @@
 class CommandFixture : public virtual IdentityManagementFixture
 {
 protected:
-  CommandFixture();
+  CommandFixture()
+  {
+    addIdentity("/ndn/test/repo");
+    saveIdentityCertificate("/ndn/test/repo", "tests/integrated/insert-delete-test.cert");
+    validator.load("tests/integrated/insert-delete-validator-config.conf");
+  }
 
 protected:
   Face repoFace;
-  Scheduler scheduler;
-  ndn::KeyChain& keyChain;
-  ndn::mgmt::Dispatcher dispatcher;
+  Scheduler scheduler{repoFace.getIoContext()};
+  ndn::mgmt::Dispatcher dispatcher{repoFace, m_keyChain};
   /// \todo #4091 switch to ValidatorPolicyConf and load insert-delete-validator-config.conf
-  ndn::security::ValidatorConfig validator;
+  ndn::security::ValidatorConfig validator{repoFace};
 };
 
 } // namespace repo::tests
diff --git a/tests/integrated/test-basic-command-insert-delete.cpp b/tests/integrated/test-basic-command-insert-delete.cpp
index 0f868eb..f1a9110 100644
--- a/tests/integrated/test-basic-command-insert-delete.cpp
+++ b/tests/integrated/test-basic-command-insert-delete.cpp
@@ -50,9 +50,9 @@
   Fixture()
     : writeHandle(repoFace, *handle, dispatcher, scheduler, validator)
     , deleteHandle(repoFace, *handle, dispatcher, scheduler, validator)
-    , insertFace(repoFace.getIoService())
-    , deleteFace(repoFace.getIoService())
-    , signer(keyChain)
+    , insertFace(repoFace.getIoContext())
+    , deleteFace(repoFace.getIoContext())
+    , signer(m_keyChain)
   {
     Name cmdPrefix("/repo/command");
     repoFace.registerPrefix(cmdPrefix, nullptr,
@@ -114,11 +114,11 @@
 void
 Fixture<T>::onInsertInterest(const Interest& interest)
 {
-  Data data(Name(interest.getName()));
+  Data data(interest.getName());
   data.setContent(CONTENT);
-  data.setFreshnessPeriod(0_ms);
-  keyChain.sign(data);
+  m_keyChain.sign(data);
   insertFace.put(data);
+
   auto eventIt = insertEvents.find(interest.getName());
   if (eventIt != insertEvents.end()) {
     eventIt->second.cancel();
diff --git a/tests/integrated/test-basic-interest-read.cpp b/tests/integrated/test-basic-interest-read.cpp
index 81ceb98..c2b6a17 100644
--- a/tests/integrated/test-basic-interest-read.cpp
+++ b/tests/integrated/test-basic-interest-read.cpp
@@ -38,15 +38,15 @@
 {
 public:
   BasicInterestReadFixture()
-    : scheduler(repoFace.getIoService())
+    : scheduler(repoFace.getIoContext())
     , readHandle(repoFace, *handle, 0)
-    , readFace(repoFace.getIoService())
+    , readFace(repoFace.getIoContext())
   {
   }
 
   ~BasicInterestReadFixture()
   {
-    repoFace.getIoService().stop();
+    repoFace.getIoContext().stop();
   }
 
   void
diff --git a/tests/unit/read-handle.t.cpp b/tests/unit/read-handle.t.cpp
index 9d36b18..553f651 100644
--- a/tests/unit/read-handle.t.cpp
+++ b/tests/unit/read-handle.t.cpp
@@ -44,7 +44,7 @@
 public:
   Fixture()
     : face({true, true})
-    , scheduler(face.getIoService())
+    , scheduler(face.getIoContext())
     , subsetLength(1)
     , dataPrefix("/ndn/test/prefix")
     , identity("/ndn/test/identity")
diff --git a/tests/unit/tcp-bulk-insert-handle.cpp b/tests/unit/tcp-bulk-insert-handle.cpp
index 9c0398b..e227167 100644
--- a/tests/unit/tcp-bulk-insert-handle.cpp
+++ b/tests/unit/tcp-bulk-insert-handle.cpp
@@ -18,10 +18,11 @@
  */
 
 #include "handles/tcp-bulk-insert-handle.hpp"
-#include "storage/sqlite-storage.hpp"
+
 #include "../repo-storage-fixture.hpp"
 #include "../dataset-fixtures.hpp"
 
+#include <boost/asio/ip/tcp.hpp>
 #include <boost/test/unit_test.hpp>
 
 namespace repo::tests {
@@ -34,28 +35,21 @@
   void
   start(const std::string& host, const std::string& port)
   {
-    using namespace boost::asio;
-
-    ip::tcp::resolver resolver(ioCtx);
-    ip::tcp::resolver::query query(host, port);
-
-    ip::tcp::resolver::iterator endpoint = resolver.resolve(query);
-    ip::tcp::resolver::iterator end;
-
-    if (endpoint == end)
+    boost::asio::ip::tcp::resolver resolver(ioCtx);
+    boost::system::error_code ec;
+    auto results = resolver.resolve(host, port, ec);
+    if (ec) {
       BOOST_FAIL("Cannot resolve [" + host + ":" + port + "]");
+    }
 
-    ip::tcp::endpoint serverEndpoint = *endpoint;
-
-    socket.async_connect(serverEndpoint,
-                         std::bind(&TcpClient::onSuccessfullConnect, this, _1));
+    socket.async_connect(*results.begin(), std::bind(&TcpClient::handleConnect, this, _1));
   }
 
   virtual void
-  onSuccessfullConnect(const boost::system::error_code& error)
+  handleConnect(const boost::system::error_code& error)
   {
     if (error) {
-      BOOST_FAIL("TCP connection aborted");
+      BOOST_FAIL("TCP connection failed");
     }
   }
 
@@ -78,9 +72,9 @@
   }
 
   void
-  onSuccessfullConnect(const boost::system::error_code& error) override
+  handleConnect(const boost::system::error_code& error) override
   {
-    TcpClient::onSuccessfullConnect(error);
+    TcpClient::handleConnect(error);
 
     // This value may need to be adjusted if some dataset exceeds 100k
     socket.set_option(boost::asio::socket_base::send_buffer_size(100000));
