diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index 9df8384..15f28e0 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -24,6 +24,7 @@
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/security/verification-helpers.hpp>
 #include <ndn-cxx/security/signing-helpers.hpp>
+#include <ndn-cxx/util/random.hpp>
 
 namespace ndn {
 namespace ndncert {
diff --git a/src/challenge-module.cpp b/src/challenge-module.cpp
index 371be25..224a30c 100644
--- a/src/challenge-module.cpp
+++ b/src/challenge-module.cpp
@@ -20,7 +20,7 @@
 
 #include "challenge-module.hpp"
 #include "logging.hpp"
-#include <random>
+#include <ndn-cxx/util/random.hpp>
 
 namespace ndn {
 namespace ndncert {
diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
index 30d00d8..f2b7e1b 100644
--- a/tests/identity-management-fixture.cpp
+++ b/tests/identity-management-fixture.cpp
@@ -34,62 +34,6 @@
 namespace ndncert {
 namespace tests {
 
-IdentityManagementFixture::IdentityManagementFixture()
-  : m_keyChain("sqlite3", "file")
-{
-  m_keyChain.getDefaultCertificate(); // side effect: create a default cert if it doesn't exist
-}
-
-IdentityManagementFixture::~IdentityManagementFixture()
-{
-  for (const auto& id : m_identities) {
-    m_keyChain.deleteIdentity(id);
-  }
-
-  boost::system::error_code ec;
-  for (const auto& certFile : m_certFiles) {
-    boost::filesystem::remove(certFile, ec); // ignore error
-  }
-}
-
-bool
-IdentityManagementFixture::addIdentity(const Name& identity, const ndn::KeyParams& params)
-{
-  try {
-    m_keyChain.createIdentity(identity, params);
-    m_identities.push_back(identity);
-    return true;
-  }
-  catch (std::runtime_error&) {
-    return false;
-  }
-}
-
-bool
-IdentityManagementFixture::saveIdentityCertificate(const Name& identity,
-                                                   const std::string& filename, bool wantAdd)
-{
-  shared_ptr<ndn::IdentityCertificate> cert;
-  try {
-    cert = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(identity));
-  }
-  catch (const ndn::SecPublicInfo::Error&) {
-    if (wantAdd && this->addIdentity(identity)) {
-      return this->saveIdentityCertificate(identity, filename, false);
-    }
-    return false;
-  }
-
-  m_certFiles.push_back(filename);
-  try {
-    ndn::io::save(*cert, filename);
-    return true;
-  }
-  catch (const ndn::io::Error&) {
-    return false;
-  }
-}
-
 IdentityManagementV2Fixture::IdentityManagementV2Fixture()
   : m_keyChain("pib-memory:", "tpm-memory:")
 {
diff --git a/tests/identity-management-fixture.hpp b/tests/identity-management-fixture.hpp
index 8a80da8..68a6d14 100644
--- a/tests/identity-management-fixture.hpp
+++ b/tests/identity-management-fixture.hpp
@@ -29,7 +29,6 @@
 #define NDNCERT_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
 
 #include "test-common.hpp"
-#include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/security/v2/key-chain.hpp>
 #include <ndn-cxx/security/v2/additional-description.hpp>
 #include <ndn-cxx/security/signing-helpers.hpp>
@@ -38,41 +37,6 @@
 namespace ndncert {
 namespace tests {
 
-/** \brief a fixture that cleans up KeyChain identities and certificate files upon destruction
- */
-class IdentityManagementFixture : public virtual BaseFixture
-{
-public:
-  IdentityManagementFixture();
-
-  /** \brief deletes created identities and saved certificate files
-   */
-  ~IdentityManagementFixture();
-
-  /** \brief add identity
-   *  \return whether successful
-   */
-  bool
-  addIdentity(const Name& identity,
-              const ndn::KeyParams& params = ndn::KeyChain::DEFAULT_KEY_PARAMS);
-
-  /** \brief save identity certificate to a file
-   *  \param identity identity name
-   *  \param filename file name, should be writable
-   *  \param wantAdd if true, add new identity when necessary
-   *  \return whether successful
-   */
-  bool
-  saveIdentityCertificate(const Name& identity, const std::string& filename, bool wantAdd = false);
-
-protected:
-  ndn::KeyChain m_keyChain;
-
-private:
-  std::vector<ndn::Name> m_identities;
-  std::vector<std::string> m_certFiles;
-};
-
 /**
  * @brief A test suite level fixture to help with identity management
  *
@@ -129,14 +93,6 @@
 };
 
 /** \brief convenience base class for inheriting from both UnitTestTimeFixture
- *         and IdentityManagementFixture
- */
-class IdentityManagementTimeFixture : public UnitTestTimeFixture
-                                    , public IdentityManagementFixture
-{
-};
-
-/** \brief convenience base class for inheriting from both UnitTestTimeFixture
  *         and IdentityManagementV2Fixture
  */
 class IdentityManagementV2TimeFixture : public UnitTestTimeFixture
diff --git a/tests/unit-tests/client-module.t.cpp b/tests/unit-tests/client-module.t.cpp
index 02eb3b6..777948f 100644
--- a/tests/unit-tests/client-module.t.cpp
+++ b/tests/unit-tests/client-module.t.cpp
@@ -56,43 +56,44 @@
   client.getClientConf().m_caItems.push_back(item);
 
   int nInterest = 0;
-  face.onSendInterest.connect([&] (const Interest& interest) {
-      nInterest++;
-      if (nInterest == 1) {
-        // PROBE interest and return identifier
-        BOOST_CHECK_EQUAL(interest.getName().toUri(), "/site/CA/_PROBE/zhiyi%40cs.ucla.edu");
-        BOOST_CHECK_EQUAL(interest.getMustBeFresh(), 1);
+  auto processInterest = [&] (const Interest& interest) {
+    nInterest++;
+    if (nInterest == 1) {
+      // PROBE interest and return identifier
+      BOOST_CHECK_EQUAL(interest.getName().toUri(), "/site/CA/_PROBE/zhiyi%40cs.ucla.edu");
+      BOOST_CHECK_EQUAL(interest.getMustBeFresh(), 1);
 
-        auto data = make_shared<Data>();
-        data->setName(interest.getName());
-        JsonSection json = genResponseProbeJson(Name("/site/CA/ucla-cs-zhiyi"), Name(""));
-        std::stringstream ss;
-        boost::property_tree::write_json(ss, json);
-        Block dataContent = makeStringBlock(ndn::tlv::Content, ss.str());
-        data->setContent(dataContent);
-        m_keyChain.sign(*data, signingByCertificate(cert));
-        face.receive(*data);
-      }
-      else {
-        // NEW interest and return challenge list, request ID
-        BOOST_CHECK_EQUAL(interest.getName().getPrefix(3).toUri(), "/site/CA/_NEW");
-        BOOST_CHECK_EQUAL(interest.getName().size(), 6);
+      auto data = make_shared<Data>();
+      data->setName(interest.getName());
+      JsonSection json = genResponseProbeJson(Name("/site/CA/ucla-cs-zhiyi"), Name(""));
+      std::stringstream ss;
+      boost::property_tree::write_json(ss, json);
+      Block dataContent = makeStringBlock(ndn::tlv::Content, ss.str());
+      data->setContent(dataContent);
+      m_keyChain.sign(*data, signingByCertificate(cert));
+      face.receive(*data);
+    }
+    else {
+      // NEW interest and return challenge list, request ID
+      BOOST_CHECK_EQUAL(interest.getName().getPrefix(3).toUri(), "/site/CA/_NEW");
+      BOOST_CHECK_EQUAL(interest.getName().size(), 6);
 
-        auto data = make_shared<Data>();
-        data->setName(interest.getName());
-        std::list<std::string> challenges;
-        challenges.push_back("EMAIL");
-        challenges.push_back("PIN");
-        JsonSection json = genResponseNewJson("1234", ChallengeModule::WAIT_SELECTION, challenges);
-        std::stringstream ss;
-        boost::property_tree::write_json(ss, json);
-        Block dataContent = makeStringBlock(ndn::tlv::Content, ss.str());
-        data->setContent(dataContent);
-        m_keyChain.sign(*data, signingByCertificate(cert));
+      auto data = make_shared<Data>();
+      data->setName(interest.getName());
+      std::list<std::string> challenges;
+      challenges.push_back("EMAIL");
+      challenges.push_back("PIN");
+      JsonSection json = genResponseNewJson("1234", ChallengeModule::WAIT_SELECTION, challenges);
+      std::stringstream ss;
+      boost::property_tree::write_json(ss, json);
+      Block dataContent = makeStringBlock(ndn::tlv::Content, ss.str());
+      data->setContent(dataContent);
+      m_keyChain.sign(*data, signingByCertificate(cert));
 
-        face.receive(*data);
-      }
-    });
+      face.receive(*data);
+    }
+  };
+  face.onSendInterest.connect([=] (const Interest& interest) { m_io.post([=] { processInterest(interest); }); });
 
   int nCallback = 0;
   shared_ptr<RequestState> requestState = nullptr;
