Avoid deprecated Boost.Asio interfaces

Change-Id: I7041c89ea9147e08c8b6226b84a6d17dddeed0e1
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