diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
index 6767d62..cb2a6de 100644
--- a/tests/identity-management-fixture.cpp
+++ b/tests/identity-management-fixture.cpp
@@ -21,22 +21,18 @@
 
 #include "identity-management-fixture.hpp"
 #include "util/io.hpp"
+#include "security/v2/additional-description.hpp"
 
 #include <boost/filesystem.hpp>
 
 namespace ndn {
 namespace tests {
 
-IdentityManagementFixture::IdentityManagementFixture()
-{
-}
+namespace v1 = security::v1;
+namespace v2 = security::v2;
 
-IdentityManagementFixture::~IdentityManagementFixture()
+IdentityManagementBaseFixture::~IdentityManagementBaseFixture()
 {
-  for (const auto& identity : m_identities) {
-    m_keyChain.deleteIdentity(identity);
-  }
-
   boost::system::error_code ec;
   for (const auto& certFile : m_certFiles) {
     boost::filesystem::remove(certFile, ec); // ignore error
@@ -44,36 +40,11 @@
 }
 
 bool
-IdentityManagementFixture::addIdentity(const Name& identity, const KeyParams& params)
+IdentityManagementBaseFixture::saveCertToFile(const Data& obj, const std::string& filename)
 {
+  m_certFiles.insert(filename);
   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<security::v1::IdentityCertificate> cert;
-  try {
-    cert = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(identity));
-  }
-  catch (const security::v1::SecPublicInfo::Error&) {
-    if (wantAdd && this->addIdentity(identity)) {
-      return this->saveIdentityCertificate(identity, filename, false);
-    }
-    return false;
-  }
-
-  m_certFiles.push_back(filename);
-  try {
-    io::save(*cert, filename);
+    io::save(obj, filename);
     return true;
   }
   catch (const io::Error&) {
@@ -81,33 +52,111 @@
   }
 }
 
+IdentityManagementV1Fixture::~IdentityManagementV1Fixture()
+{
+  for (const auto& identity : m_identities) {
+    m_keyChain.deleteIdentity(identity);
+  }
+}
+
+Name
+IdentityManagementV1Fixture::addIdentity(const Name& identity, const KeyParams& params)
+{
+  Name certName = m_keyChain.createIdentity(identity, params);
+  m_identities.insert(identity);
+  return certName;
+}
+
 bool
-IdentityManagementFixture::addSubCertificate(const Name& identity, const Name& issuer,
-                                             const KeyParams& params)
+IdentityManagementV1Fixture::saveIdentityCertificate(const Name& certName, const std::string& filename)
+{
+  try {
+    auto cert = m_keyChain.getCertificate(certName);
+    return saveCertToFile(*cert, filename);
+  }
+  catch (const v1::SecPublicInfo::Error&) {
+    return false;
+  }
+}
+
+bool
+IdentityManagementV1Fixture::addSubCertificate(const Name& subIdentity, const Name& issuer, const KeyParams& params)
 {
   if (!m_keyChain.doesIdentityExist(issuer))
     return false;
-  if (!m_keyChain.doesIdentityExist(identity)) {
-    addIdentity(identity, params);
+  if (!m_keyChain.doesIdentityExist(subIdentity)) {
+    addIdentity(subIdentity, params);
   }
   Name identityKeyName;
   try {
-    identityKeyName = m_keyChain.getDefaultKeyNameForIdentity(identity);
+    identityKeyName = m_keyChain.getDefaultKeyNameForIdentity(subIdentity);
   }
-  catch (const security::v1::SecPublicInfo::Error&) {
-    identityKeyName = m_keyChain.generateRsaKeyPairAsDefault(identity, true);
+  catch (const v1::SecPublicInfo::Error&) {
+    identityKeyName = m_keyChain.generateRsaKeyPairAsDefault(subIdentity, true);
   }
-  std::vector<security::v1::CertificateSubjectDescription> subjectDescription;
-  shared_ptr<security::v1::IdentityCertificate> identityCert =
+  std::vector<v1::CertificateSubjectDescription> subjectDescription;
+  shared_ptr<v1::IdentityCertificate> identityCert =
     m_keyChain.prepareUnsignedIdentityCertificate(identityKeyName,
                                                   issuer,
                                                   time::system_clock::now(),
                                                   time::system_clock::now() + time::days(7300),
                                                   subjectDescription);
-  m_keyChain.sign(*identityCert, security::signingByIdentity(issuer));
+  m_keyChain.sign(*identityCert, signingByIdentity(issuer));
   m_keyChain.addCertificateAsIdentityDefault(*identityCert);
   return true;
 }
 
+IdentityManagementV2Fixture::IdentityManagementV2Fixture()
+  : m_keyChain("pib-memory:", "tpm-memory:")
+{
+}
+
+security::Identity
+IdentityManagementV2Fixture::addIdentity(const Name& identityName, const KeyParams& params)
+{
+  auto identity = m_keyChain.createIdentity(identityName, params);
+  m_identities.insert(identityName);
+  return identity;
+}
+
+bool
+IdentityManagementV2Fixture::saveIdentityCertificate(const security::Identity& identity,
+                                                     const std::string& filename)
+{
+  try {
+    auto cert = identity.getDefaultKey().getDefaultCertificate();
+    return saveCertToFile(cert, filename);
+  }
+  catch (const security::Pib::Error&) {
+    return false;
+  }
+}
+
+security::Identity
+IdentityManagementV2Fixture::addSubCertificate(const Name& subIdentityName,
+                                               const security::Identity& issuer, const KeyParams& params)
+{
+  auto subIdentity = addIdentity(subIdentityName, params);
+
+  v2::Certificate request = subIdentity.getDefaultKey().getDefaultCertificate();
+
+  request.setName(request.getKeyName().append("parent").appendVersion());
+
+  SignatureInfo info;
+  info.setValidityPeriod(security::ValidityPeriod(time::system_clock::now(),
+                                                  time::system_clock::now() + time::days(7300)));
+
+  v2::AdditionalDescription description;
+  description.set("type", "sub-certificate");
+  info.appendTypeSpecificTlv(description.wireEncode());
+
+  request.setSignature(Signature(info));
+
+  m_keyChain.sign(request, signingByIdentity(issuer));
+  m_keyChain.setDefaultCertificate(subIdentity.getDefaultKey(), request);
+
+  return subIdentity;
+}
+
 } // namespace tests
 } // namespace ndn
diff --git a/tests/identity-management-fixture.hpp b/tests/identity-management-fixture.hpp
index f96a24c..d2d1473 100644
--- a/tests/identity-management-fixture.hpp
+++ b/tests/identity-management-fixture.hpp
@@ -23,61 +23,121 @@
 #define NDN_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
 
 #include "security/v1/key-chain.hpp"
+#include "security/v2/key-chain.hpp"
 #include "security/signing-helpers.hpp"
 #include <vector>
 
 #include "boost-test.hpp"
+#include "test-home-fixture.hpp"
 
 namespace ndn {
 namespace tests {
 
-/**
- * @brief IdentityManagementFixture is a test suite level fixture.
- * Test cases in the suite can use this fixture to create identities.
- * Identities added via addIdentity method are automatically deleted
- * during test teardown.
- */
-class IdentityManagementFixture
+class IdentityManagementBaseFixture : public TestHomeFixture<DefaultPibDir>
 {
 public:
-  IdentityManagementFixture();
+  ~IdentityManagementBaseFixture();
 
-  ~IdentityManagementFixture();
-
-  /// @brief add identity, return true if succeed.
   bool
+  saveCertToFile(const Data& obj, const std::string& filename);
+
+protected:
+  std::set<Name> m_identities;
+  std::set<std::string> m_certFiles;
+};
+
+/**
+ * @brief A test suite level fixture to help with identity management
+ *
+ * Test cases in the suite can use this fixture to create identities.  Identities,
+ * certificates, and saved certificates are automatically removed during test teardown.
+ *
+ * @deprecated Use IdentityManagementV2Fixture
+ */
+class IdentityManagementV1Fixture : public IdentityManagementBaseFixture
+{
+public:
+  ~IdentityManagementV1Fixture();
+
+  /**
+   * @brief Add identity
+   * @return name of the created self-signed certificate
+   */
+  Name
   addIdentity(const Name& identity, const KeyParams& params = security::v1::KeyChain::DEFAULT_KEY_PARAMS);
 
   /**
    *  @brief save identity certificate to a file
-   *  @param identity identity name
+   *  @param identity certificate 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);
+  saveIdentityCertificate(const Name& certName, const std::string& filename);
 
-  /** \brief issue a certificate for \p identity signed by \p issuer
+  /**
+   * @brief issue a certificate for \p subIdentity signed by \p issuer
    *
    *  If identity does not exist, it is created.
    *  A new key is generated as the default key for identity.
    *  A default certificate for the key is signed by the issuer using its default certificate.
    *
-   *  \return whether success
+   *  @return whether success
    */
   bool
-  addSubCertificate(const Name& identity, const Name& issuer,
+  addSubCertificate(const Name& subIdentity, const Name& issuer,
                     const KeyParams& params = security::v1::KeyChain::DEFAULT_KEY_PARAMS);
 
 protected:
   security::v1::KeyChain m_keyChain;
-
-private:
-  std::vector<Name> m_identities;
-  std::vector<std::string> m_certFiles;
 };
 
+/**
+ * @brief A test suite level fixture to help with identity management
+ *
+ * Test cases in the suite can use this fixture to create identities.  Identities,
+ * certificates, and saved certificates are automatically removed during test teardown.
+ */
+class IdentityManagementV2Fixture : public IdentityManagementBaseFixture
+{
+public:
+  IdentityManagementV2Fixture();
+
+  /**
+   * @brief Add identity @p identityName
+   * @return name of the created self-signed certificate
+   */
+  security::Identity
+  addIdentity(const Name& identityName, const KeyParams& params = security::v2::KeyChain::getDefaultKeyParams());
+
+  /**
+   *  @brief Save identity certificate to a file
+   *  @param identity identity
+   *  @param filename file name, should be writable
+   *  @return whether successful
+   */
+  bool
+  saveIdentityCertificate(const security::Identity& identity, const std::string& filename);
+
+  /**
+   * @brief Issue a certificate for \p subIdentityName signed by \p issuer
+   *
+   *  If identity does not exist, it is created.
+   *  A new key is generated as the default key for identity.
+   *  A default certificate for the key is signed by the issuer using its default certificate.
+   *
+   *  @return the sub identity
+   */
+  security::Identity
+  addSubCertificate(const Name& subIdentityName, const security::Identity& issuer,
+                    const KeyParams& params = security::v2::KeyChain::getDefaultKeyParams());
+
+protected:
+  security::v2::KeyChain m_keyChain;
+};
+
+using IdentityManagementFixture = IdentityManagementV1Fixture;
+
 } // namespace tests
 } // namespace ndn
 
diff --git a/tests/integrated/face.cpp b/tests/integrated/face.cpp
index 799a562..9d358a5 100644
--- a/tests/integrated/face.cpp
+++ b/tests/integrated/face.cpp
@@ -28,7 +28,6 @@
 
 #include "identity-management-fixture.hpp"
 #include "boost-test.hpp"
-#include "key-chain-fixture.hpp"
 
 #include <stdio.h>
 
@@ -40,8 +39,7 @@
   const std::string PATH = "build/keys-with-default-tpm";
 };
 
-class FacesFixture : public IdentityManagementFixture,
-                     public PibDirFixture<PibDirWithDefaultTpm>
+class FacesFixture : public IdentityManagementFixture
 {
 public:
   FacesFixture()
diff --git a/tests/key-chain-fixture.cpp b/tests/key-chain-fixture.cpp
deleted file mode 100644
index a8f951b..0000000
--- a/tests/key-chain-fixture.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library 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.
- *
- * ndn-cxx library 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 copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- */
-
-#include "key-chain-fixture.hpp"
-
-namespace ndn {
-namespace tests {
-
-KeyChainFixture::KeyChainFixture()
-{
-  addIdentity(Name("/localhost/ndn-cxx-test-identity").appendVersion());
-}
-
-BOOST_GLOBAL_FIXTURE(KeyChainFixture)
-#if BOOST_VERSION >= 105900
-;
-#endif // BOOST_VERSION >= 105900
-
-} // namespace tests
-} // namespace ndn
diff --git a/tests/key-chain-fixture.hpp b/tests/test-home-fixture.hpp
similarity index 92%
rename from tests/key-chain-fixture.hpp
rename to tests/test-home-fixture.hpp
index 014f572..8bc1fd1 100644
--- a/tests/key-chain-fixture.hpp
+++ b/tests/test-home-fixture.hpp
@@ -25,7 +25,6 @@
 #include "security/v2/key-chain.hpp"
 
 #include "boost-test.hpp"
-#include "identity-management-fixture.hpp"
 
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
@@ -117,23 +116,11 @@
   }
 };
 
-
 struct DefaultPibDir
 {
   const std::string PATH = "build/keys";
 };
 
-/**
- * @brief Fixture to create a test KeyChain with default identity
- */
-class KeyChainFixture : public PibDirFixture<DefaultPibDir>,
-                        public IdentityManagementFixture
-{
-public:
-  KeyChainFixture();
-};
-
-
 } // namespace tests
 } // namespace ndn
 
diff --git a/tests/unit-tests/face.t.cpp b/tests/unit-tests/face.t.cpp
index 7d4c9c8..2813bd1 100644
--- a/tests/unit-tests/face.t.cpp
+++ b/tests/unit-tests/face.t.cpp
@@ -28,7 +28,7 @@
 
 #include "boost-test.hpp"
 #include "identity-management-time-fixture.hpp"
-#include "key-chain-fixture.hpp"
+#include "test-home-fixture.hpp"
 #include "make-interest-data.hpp"
 
 namespace ndn {
diff --git a/tests/unit-tests/identity-management-time-fixture.hpp b/tests/unit-tests/identity-management-time-fixture.hpp
index 3451b30..286c8d7 100644
--- a/tests/unit-tests/identity-management-time-fixture.hpp
+++ b/tests/unit-tests/identity-management-time-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -28,17 +28,18 @@
 namespace ndn {
 namespace tests {
 
-/**
- * @brief IdentityManagementTimeFixture is a test suite level fixture.
- * Test cases in the suite can use this fixture to create identities.
- * Identities added via addIdentity method are automatically deleted
- * during test teardown.
- */
-class IdentityManagementTimeFixture : public UnitTestTimeFixture
-                                    , public IdentityManagementFixture
+class IdentityManagementV1TimeFixture : public UnitTestTimeFixture
+                                      , public IdentityManagementV1Fixture
 {
 };
 
+class IdentityManagementV2TimeFixture : public UnitTestTimeFixture
+                                      , public IdentityManagementV2Fixture
+{
+};
+
+using IdentityManagementTimeFixture = IdentityManagementV1TimeFixture;
+
 } // namespace tests
 } // namespace ndn
 
diff --git a/tests/unit-tests/mgmt/nfd/controller-fixture.hpp b/tests/unit-tests/mgmt/nfd/controller-fixture.hpp
index 76e7bde..e3eb36f 100644
--- a/tests/unit-tests/mgmt/nfd/controller-fixture.hpp
+++ b/tests/unit-tests/mgmt/nfd/controller-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -45,12 +45,8 @@
     , datasetFailCallback(bind(&ControllerFixture::recordDatasetFail, this, _1, _2))
   {
     Name identityName("/localhost/ControllerFixture");
-    if (this->addIdentity(identityName)) {
-      m_keyChain.setDefaultIdentity(identityName);
-    }
-    else {
-      BOOST_FAIL("cannot create identity");
-    }
+    this->addIdentity(identityName);
+    m_keyChain.setDefaultIdentity(identityName);
   }
 
   /** \brief controls whether Controller's validator should accept or reject validation requests
diff --git a/tests/unit-tests/security/command-interest-validator.t.cpp b/tests/unit-tests/security/command-interest-validator.t.cpp
index f31f3a3..09ae2b9 100644
--- a/tests/unit-tests/security/command-interest-validator.t.cpp
+++ b/tests/unit-tests/security/command-interest-validator.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -56,7 +56,7 @@
   {
     Name name("/localhost/CommandInterestValidatorIdentity");
     name.appendSequenceNumber(identity);
-    BOOST_REQUIRE(m_keyChain.doesIdentityExist(name) || this->addIdentity(name));
+    this->addIdentity(name);
     return name;
   }
 
diff --git a/tests/unit-tests/security/conf/checker.t.cpp b/tests/unit-tests/security/conf/checker.t.cpp
index 9ddf43a..493ac16 100644
--- a/tests/unit-tests/security/conf/checker.t.cpp
+++ b/tests/unit-tests/security/conf/checker.t.cpp
@@ -42,11 +42,11 @@
   using security::conf::RelationKeyLocatorNameChecker;
 
   Name identity("/SecurityTestConfChecker/CustomizedCheckerTest1");
-  BOOST_REQUIRE(addIdentity(identity, RsaKeyParams()));
+  addIdentity(identity, RsaKeyParams());
   Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
 
   Name identity2("/SecurityTestConfChecker/CustomizedCheckerTest1Wrong");
-  BOOST_REQUIRE(addIdentity(identity2, RsaKeyParams()));
+  addIdentity(identity2, RsaKeyParams());
   Name certName2 = m_keyChain.getDefaultCertificateNameForIdentity(identity2);
 
   Name packetName("/SecurityTestConfChecker/CustomizedCheckerTest1/Data");
@@ -157,11 +157,11 @@
   using security::conf::RegexKeyLocatorNameChecker;
 
   Name identity("/SecurityTestConfChecker/CustomizedCheckerTest2");
-  BOOST_REQUIRE(addIdentity(identity, RsaKeyParams()));
+  addIdentity(identity, RsaKeyParams());
   Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
 
   Name identity2("/SecurityTestConfChecker/CustomizedCheckerTest2Wrong");
-  BOOST_REQUIRE(addIdentity(identity2, RsaKeyParams()));
+  addIdentity(identity2, RsaKeyParams());
   Name certName2 = m_keyChain.getDefaultCertificateNameForIdentity(identity2);
 
   Name packetName("/SecurityTestConfChecker/CustomizedCheckerTest2/Data");
@@ -213,11 +213,11 @@
   using security::conf::RegexKeyLocatorNameChecker;
 
   Name identity("/SecurityTestConfChecker/CustomizedCheckerTest3");
-  BOOST_REQUIRE(addIdentity(identity, EcdsaKeyParams()));
+  addIdentity(identity, EcdsaKeyParams());
   Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
 
   Name identity2("/SecurityTestConfChecker/CustomizedCheckerTest3Wrong");
-  BOOST_REQUIRE(addIdentity(identity2, EcdsaKeyParams()));
+  addIdentity(identity2, EcdsaKeyParams());
   Name certName2 = m_keyChain.getDefaultCertificateNameForIdentity(identity2);
 
   Name packetName("/SecurityTestConfChecker/CustomizedCheckerTest3/Data");
@@ -273,11 +273,11 @@
   using security::conf::HierarchicalChecker;
 
   Name identity("/SecurityTestConfChecker/HierarchicalCheckerTest1");
-  BOOST_REQUIRE(addIdentity(identity, EcdsaKeyParams()));
+  addIdentity(identity, EcdsaKeyParams());
   Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
 
   Name identity2("/SecurityTestConfChecker/HierarchicalCheckerTest1/Data");
-  BOOST_REQUIRE(addIdentity(identity2, RsaKeyParams()));
+  addIdentity(identity2, RsaKeyParams());
   Name certName2 = m_keyChain.getDefaultCertificateNameForIdentity(identity2);
 
   Name packetName("/SecurityTestConfChecker/HierarchicalCheckerTest1/Data");
@@ -363,12 +363,12 @@
   using security::conf::FixedSignerChecker;
 
   Name identity("/SecurityTestConfChecker/FixedSignerCheckerTest1");
-  BOOST_REQUIRE(addIdentity(identity, EcdsaKeyParams()));
+  addIdentity(identity, EcdsaKeyParams());
   Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
   shared_ptr<v1::IdentityCertificate> cert1 = m_keyChain.getCertificate(certName);
 
   Name identity2("/SecurityTestConfChecker/FixedSignerCheckerTest1Wrong");
-  BOOST_REQUIRE(addIdentity(identity2, RsaKeyParams()));
+  addIdentity(identity2, RsaKeyParams());
   Name certName2 = m_keyChain.getDefaultCertificateNameForIdentity(identity2);
   shared_ptr<v1::IdentityCertificate> cert2 = m_keyChain.getCertificate(certName2);
 
diff --git a/tests/unit-tests/security/identity-management-fixture.t.cpp b/tests/unit-tests/security/identity-management-fixture.t.cpp
deleted file mode 100644
index 81dcfe5..0000000
--- a/tests/unit-tests/security/identity-management-fixture.t.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library 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.
- *
- * ndn-cxx library 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 copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- */
-
-#include "identity-management-fixture.hpp"
-
-#include "boost-test.hpp"
-
-namespace ndn {
-namespace tests {
-
-BOOST_AUTO_TEST_SUITE(Security)
-BOOST_FIXTURE_TEST_SUITE(TestIdentityManagementFixture, IdentityManagementFixture)
-
-BOOST_AUTO_TEST_CASE(Tmp)
-{
-  Name identity("/tmp/identity");
-  BOOST_REQUIRE(addIdentity(identity));
-  Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
-  BOOST_REQUIRE_EQUAL(certName.empty(), false);
-  BOOST_REQUIRE_NO_THROW(m_keyChain.getCertificate(certName));
-}
-
-BOOST_AUTO_TEST_SUITE_END() // TestIdentityManagementFixture
-BOOST_AUTO_TEST_SUITE_END() // Security
-
-} // namespace tests
-} // namespace ndn
diff --git a/tests/unit-tests/security/sec-rule-relative.t.cpp b/tests/unit-tests/security/sec-rule-relative.t.cpp
index 21f805e..4209f28 100644
--- a/tests/unit-tests/security/sec-rule-relative.t.cpp
+++ b/tests/unit-tests/security/sec-rule-relative.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -34,9 +34,9 @@
 BOOST_AUTO_TEST_CASE(Basic)
 {
   Name rsaIdentity("/SecurityTestSecRule/Basic/Rsa");
-  BOOST_REQUIRE(addIdentity(rsaIdentity, RsaKeyParams()));
+  addIdentity(rsaIdentity, RsaKeyParams());
   Name ecdsaIdentity("/SecurityTestSecRule/Basic/Ecdsa");
-  BOOST_REQUIRE(addIdentity(ecdsaIdentity, EcdsaKeyParams()));
+  addIdentity(ecdsaIdentity, EcdsaKeyParams());
 
   Name dataName("SecurityTestSecRule/Basic");
   Data rsaData(dataName);
diff --git a/tests/unit-tests/security/sec-rule-specific.t.cpp b/tests/unit-tests/security/sec-rule-specific.t.cpp
index d8c5d24..761b60f 100644
--- a/tests/unit-tests/security/sec-rule-specific.t.cpp
+++ b/tests/unit-tests/security/sec-rule-specific.t.cpp
@@ -36,9 +36,9 @@
 BOOST_AUTO_TEST_CASE(Basic)
 {
   Name rsaIdentity("/SecurityTestSecRule/Basic/Rsa");
-  BOOST_REQUIRE(addIdentity(rsaIdentity, RsaKeyParams()));
+  addIdentity(rsaIdentity, RsaKeyParams());
   Name ecdsaIdentity("/SecurityTestSecRule/Basic/Ecdsa");
-  BOOST_REQUIRE(addIdentity(ecdsaIdentity, EcdsaKeyParams()));
+  addIdentity(ecdsaIdentity, EcdsaKeyParams());
 
   Name dataName("SecurityTestSecRule/Basic");
   Data rsaData(dataName);
diff --git a/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp b/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
index c54ee4c..7f20981 100644
--- a/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
+++ b/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
@@ -105,7 +105,7 @@
 BOOST_AUTO_TEST_CASE(DataSignature)
 {
   Name identityName("/SecurityTestSignatureSha256WithEcdsa/DataSignature");
-  BOOST_REQUIRE(addIdentity(identityName, EcdsaKeyParams()));
+  addIdentity(identityName, EcdsaKeyParams());
   shared_ptr<security::v1::PublicKey> publicKey;
   BOOST_REQUIRE_NO_THROW(publicKey = m_keyChain.getPublicKeyFromTpm(
     m_keyChain.getDefaultKeyNameForIdentity(identityName)));
@@ -126,7 +126,7 @@
 BOOST_AUTO_TEST_CASE(InterestSignature)
 {
   Name identityName("/SecurityTestSignatureSha256WithEcdsa/InterestSignature");
-  BOOST_REQUIRE(addIdentity(identityName, EcdsaKeyParams()));
+  addIdentity(identityName, EcdsaKeyParams());
   shared_ptr<security::v1::PublicKey> publicKey;
   BOOST_REQUIRE_NO_THROW(publicKey = m_keyChain.getPublicKeyFromTpm(
     m_keyChain.getDefaultKeyNameForIdentity(identityName)));
diff --git a/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp b/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
index 494ea71..4944cbd 100644
--- a/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
+++ b/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
@@ -110,7 +110,7 @@
 BOOST_AUTO_TEST_CASE(DataSignature)
 {
   Name identityName("/SecurityTestSignatureSha256WithRsa/DataSignature");
-  BOOST_REQUIRE(addIdentity(identityName, RsaKeyParams()));
+  addIdentity(identityName, RsaKeyParams());
   shared_ptr<security::v1::PublicKey> publicKey;
   BOOST_REQUIRE_NO_THROW(publicKey = m_keyChain.getPublicKeyFromTpm(
     m_keyChain.getDefaultKeyNameForIdentity(identityName)));
@@ -131,7 +131,7 @@
 BOOST_AUTO_TEST_CASE(InterestSignature)
 {
   Name identityName("/SecurityTestSignatureSha256WithRsa/InterestSignature");
-  BOOST_REQUIRE(addIdentity(identityName, RsaKeyParams()));
+  addIdentity(identityName, RsaKeyParams());
   shared_ptr<security::v1::PublicKey> publicKey;
   BOOST_REQUIRE_NO_THROW(publicKey = m_keyChain.getPublicKeyFromTpm(
     m_keyChain.getDefaultKeyNameForIdentity(identityName)));
diff --git a/tests/unit-tests/security/v1/key-chain.t.cpp b/tests/unit-tests/security/v1/key-chain.t.cpp
index 6130cae..36dac9c 100644
--- a/tests/unit-tests/security/v1/key-chain.t.cpp
+++ b/tests/unit-tests/security/v1/key-chain.t.cpp
@@ -26,7 +26,7 @@
 #include "boost-test.hpp"
 #include "dummy-keychain.hpp"
 #include "../../test-home-env-saver.hpp"
-#include "key-chain-fixture.hpp"
+#include "test-home-fixture.hpp"
 #include "identity-management-fixture.hpp"
 
 #include <boost/algorithm/string.hpp>
diff --git a/tests/unit-tests/security/v2/key-chain.t.cpp b/tests/unit-tests/security/v2/key-chain.t.cpp
index db14070..8ce962e 100644
--- a/tests/unit-tests/security/v2/key-chain.t.cpp
+++ b/tests/unit-tests/security/v2/key-chain.t.cpp
@@ -24,7 +24,7 @@
 
 #include "boost-test.hpp"
 #include "unit-tests/test-home-env-saver.hpp"
-#include "key-chain-fixture.hpp"
+#include "test-home-fixture.hpp"
 #include "validator.hpp"
 
 namespace ndn {
diff --git a/tests/unit-tests/security/validator-config.t.cpp b/tests/unit-tests/security/validator-config.t.cpp
index 74aab21..022e80b 100644
--- a/tests/unit-tests/security/validator-config.t.cpp
+++ b/tests/unit-tests/security/validator-config.t.cpp
@@ -49,7 +49,7 @@
 {
   Name identity("/TestValidatorConfig/NameFilter");
   identity.appendVersion();
-  BOOST_REQUIRE(saveIdentityCertificate(identity, "trust-anchor-1.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity), "trust-anchor-1.cert"));
   Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
 
   Name dataName1("/simple/equal");
@@ -113,7 +113,7 @@
 {
   Name identity("/TestValidatorConfig/NameFilter2");
   identity.appendVersion();
-  BOOST_REQUIRE(saveIdentityCertificate(identity, "trust-anchor-2.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity), "trust-anchor-2.cert"));
   Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
 
   Name dataName1("/simple/isPrefixOf");
@@ -185,7 +185,7 @@
 {
   Name identity("/TestValidatorConfig/NameFilter3");
   identity.appendVersion();
-  BOOST_REQUIRE(saveIdentityCertificate(identity, "trust-anchor-3.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity), "trust-anchor-3.cert"));
   Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
 
   Name dataName1("/simple/isStrictPrefixOf");
@@ -257,7 +257,7 @@
 {
   Name identity("/TestValidatorConfig/NameFilter4");
   identity.appendVersion();
-  BOOST_REQUIRE(saveIdentityCertificate(identity, "trust-anchor-4.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity), "trust-anchor-4.cert"));
   Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
 
   Name dataName1("/simple/regex");
@@ -328,7 +328,7 @@
 {
   Name identity("/TestValidatorConfig/KeyLocatorNameChecker1");
   identity.appendVersion();
-  BOOST_REQUIRE(saveIdentityCertificate(identity, "trust-anchor-5.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity), "trust-anchor-5.cert"));
 
   Name dataName1 = identity;
   dataName1.append("1");
@@ -397,11 +397,11 @@
 
   Name identity1 = identity;
   identity1.append("1").appendVersion();
-  BOOST_REQUIRE(saveIdentityCertificate(identity1, "trust-anchor-7.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity1), "trust-anchor-7.cert"));
 
   Name identity2 = identity;
   identity2.append("2").appendVersion();
-  BOOST_REQUIRE_NO_THROW(addIdentity(identity2));
+  addIdentity(identity2);
 
   Name dataName1 = identity;
   dataName1.append("data").appendVersion();
@@ -483,11 +483,11 @@
 {
   Name identity1("/TestValidatorConfig/MultiCheckers/");
   identity1.appendVersion();
-  BOOST_REQUIRE(saveIdentityCertificate(identity1, "trust-anchor-multi-1.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity1), "trust-anchor-multi-1.cert"));
 
   Name identity2("/TestValidatorConfig/");
   identity2.appendVersion();
-  BOOST_REQUIRE(saveIdentityCertificate(identity2, "trust-anchor-multi-2.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity2), "trust-anchor-multi-2.cert"));
 
   const std::string CONFIG =
     "rule\n"
@@ -596,7 +596,7 @@
 BOOST_AUTO_TEST_CASE(Reset)
 {
   Name root("/TestValidatorConfig/Reload");
-  BOOST_REQUIRE(saveIdentityCertificate(root, "trust-anchor-8.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(root), "trust-anchor-8.cert"));
 
   Face face(nullptr, m_keyChain);
 
@@ -657,7 +657,7 @@
 {
   Name identity("/TestValidatorConfig/Wildcard");
   identity.appendVersion();
-  BOOST_REQUIRE_NO_THROW(addIdentity(identity));
+  addIdentity(identity);
 
   Name dataName1("/any/data");
   shared_ptr<Data> data1 = make_shared<Data>(dataName1);
@@ -687,7 +687,7 @@
 
   Name identity1 = identity;
   identity1.appendVersion();
-  BOOST_REQUIRE(saveIdentityCertificate(identity1, "trust-anchor-9.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity1), "trust-anchor-9.cert"));
 
   Name interestName("/TestValidatorConfig/SignedInterestTest");
   Name interestName1 = interestName;
@@ -750,15 +750,15 @@
 
   Name identity1 = identity;
   identity1.append("Key1");
-  BOOST_REQUIRE(saveIdentityCertificate(identity1, "trust-anchor-10-1.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity1), "trust-anchor-10-1.cert"));
 
   Name identity2 = identity;
   identity2.append("Key2");
-  BOOST_REQUIRE(saveIdentityCertificate(identity2, "trust-anchor-10-2.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity2), "trust-anchor-10-2.cert"));
 
   Name identity3 = identity;
   identity3.append("Key3");
-  BOOST_REQUIRE(saveIdentityCertificate(identity3, "trust-anchor-10-3.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity3), "trust-anchor-10-3.cert"));
 
 
   Name interestName("/TestValidatorConfig/MaxKeyTest");
@@ -850,19 +850,19 @@
 
   Name identity1 = identity;
   identity1.append("Key1");
-  BOOST_REQUIRE(saveIdentityCertificate(identity1, "trust-anchor-10-1.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity1), "trust-anchor-10-1.cert"));
 
   Name identity2 = identity;
   identity2.append("Key2");
-  BOOST_REQUIRE(saveIdentityCertificate(identity2, "trust-anchor-10-2.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity2), "trust-anchor-10-2.cert"));
 
   Name identity3 = identity;
   identity3.append("Key3");
-  BOOST_REQUIRE(saveIdentityCertificate(identity3, "trust-anchor-10-3.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity3), "trust-anchor-10-3.cert"));
 
   Name identity4 = identity;
   identity4.append("Key4");
-  BOOST_REQUIRE(saveIdentityCertificate(identity4, "trust-anchor-10-4.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(identity4), "trust-anchor-10-4.cert"));
 
 
   Name interestName("/TestValidatorConfig/MaxKeyTest");
@@ -983,12 +983,12 @@
 BOOST_AUTO_TEST_CASE(FixedSignerChecker2)
 {
   Name rsaIdentity("/TestValidatorConfig/FixedSignerChecker2/Rsa");
-  BOOST_REQUIRE(addIdentity(rsaIdentity));
-  Name rsaCertName = m_keyChain.getDefaultCertificateNameForIdentity(rsaIdentity);
+  addIdentity(rsaIdentity);
+  // Name rsaCertName = m_keyChain.getDefaultCertificateNameForIdentity(rsaIdentity);
 
   Name ecdsaIdentity("/TestValidatorConfig/FixedSignerChecker2/Ecdsa");
-  BOOST_REQUIRE(addIdentity(ecdsaIdentity, EcdsaKeyParams()));
-  BOOST_REQUIRE(saveIdentityCertificate(ecdsaIdentity, "trust-anchor-11.cert"));
+  auto identity = addIdentity(ecdsaIdentity, EcdsaKeyParams());
+  BOOST_REQUIRE(saveIdentityCertificate(identity, "trust-anchor-11.cert"));
 
   Name dataName("/TestValidatorConfig/FixedSignerChecker2");
   shared_ptr<Data> dataRsa = make_shared<Data>(dataName);
@@ -1127,11 +1127,11 @@
   std::vector<v1::CertificateSubjectDescription> subjectDescription;
 
   Name root("/TestValidatorConfig");
-  BOOST_REQUIRE(saveIdentityCertificate(root, "trust-anchor-6.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(root), "trust-anchor-6.cert"));
 
 
   Name sld("/TestValidatorConfig/HierarchicalChecker");
-  BOOST_REQUIRE(addIdentity(sld));
+  addIdentity(sld);
   advanceClocks(time::milliseconds(100));
   Name sldKeyName = m_keyChain.generateRsaKeyPairAsDefault(sld, true);
   shared_ptr<v1::IdentityCertificate> sldCert =
@@ -1144,7 +1144,7 @@
   m_keyChain.addCertificateAsIdentityDefault(*sldCert);
 
   Name nld("/TestValidatorConfig/HierarchicalChecker/NextLevel");
-  BOOST_REQUIRE(addIdentity(nld));
+  addIdentity(nld);
   advanceClocks(time::milliseconds(100));
   Name nldKeyName = m_keyChain.generateRsaKeyPairAsDefault(nld, true);
   shared_ptr<v1::IdentityCertificate> nldCert =
@@ -1224,10 +1224,10 @@
   std::vector<v1::CertificateSubjectDescription> subjectDescription;
 
   Name root("/TestValidatorConfig");
-  BOOST_REQUIRE(saveIdentityCertificate(root, "trust-anchor-8.cert", true));
+  BOOST_REQUIRE(saveIdentityCertificate(addIdentity(root), "trust-anchor-8.cert"));
 
   Name sld("/TestValidatorConfig/Nrd-1");
-  BOOST_REQUIRE(addIdentity(sld));
+  addIdentity(sld);
   advanceClocks(time::milliseconds(100));
   Name sldKeyName = m_keyChain.generateRsaKeyPairAsDefault(sld, true);
   shared_ptr<v1::IdentityCertificate> sldCert =
@@ -1240,7 +1240,7 @@
   m_keyChain.addCertificateAsIdentityDefault(*sldCert);
 
   Name nld("/TestValidatorConfig/Nrd-1/Nrd-2");
-  BOOST_REQUIRE(addIdentity(nld));
+  addIdentity(nld);
   advanceClocks(time::milliseconds(100));
   Name nldKeyName = m_keyChain.generateRsaKeyPairAsDefault(nld, true);
   shared_ptr<v1::IdentityCertificate> nldCert =
@@ -1386,13 +1386,13 @@
                       std::string("trust-anchor-2.cert"));
 
     firstIdentity = Name("/TestValidatorConfig/Dir/First");
-    BOOST_REQUIRE(addIdentity(firstIdentity));
+    addIdentity(firstIdentity);
     Name firstCertName = m_keyChain.getDefaultCertificateNameForIdentity(firstIdentity);
     firstCert = m_keyChain.getCertificate(firstCertName);
     io::save(*firstCert, firstCertPath.string());
 
     secondIdentity = Name("/TestValidatorConfig/Dir/Second");
-    BOOST_REQUIRE(addIdentity(secondIdentity));
+    addIdentity(secondIdentity);
     Name secondCertName = m_keyChain.getDefaultCertificateNameForIdentity(secondIdentity);
     secondCert = m_keyChain.getCertificate(secondCertName);
   }
@@ -1494,9 +1494,9 @@
     : clientFace(io, m_keyChain, {true, true})
     , validationResult(boost::logic::indeterminate)
   {
-    BOOST_REQUIRE(addIdentity(ca));
-    BOOST_REQUIRE(saveIdentityCertificate(ca, "trust-anchor-1.cert", true));
-    BOOST_REQUIRE(addSubCertificate(user, ca));
+    auto certName = addIdentity(ca);
+    saveIdentityCertificate(certName, "trust-anchor-1.cert");
+    addSubCertificate(user, ca);
 
     userCertName = m_keyChain.getDefaultCertificateNameForIdentity(user);
     userCert = m_keyChain.getCertificate(userCertName);
diff --git a/tests/unit-tests/security/validator.t.cpp b/tests/unit-tests/security/validator.t.cpp
index 90bd1b9..0b7cda2 100644
--- a/tests/unit-tests/security/validator.t.cpp
+++ b/tests/unit-tests/security/validator.t.cpp
@@ -50,7 +50,7 @@
 {
   Name identity("/TestValidator/Null");
   identity.appendVersion();
-  BOOST_REQUIRE(addIdentity(identity, RsaKeyParams()));
+  addIdentity(identity, RsaKeyParams());
 
   Name dataName = identity;
   dataName.append("1");
@@ -94,12 +94,12 @@
 BOOST_AUTO_TEST_CASE(RsaSignatureVerification)
 {
   Name identity("/TestValidator/RsaSignatureVerification");
-  BOOST_REQUIRE(addIdentity(identity, RsaKeyParams()));
+  addIdentity(identity, RsaKeyParams());
   Name keyName = m_keyChain.getDefaultKeyNameForIdentity(identity);
   shared_ptr<v1::PublicKey> publicKey = m_keyChain.getPublicKey(keyName);
 
   Name identity2("/TestValidator/RsaSignatureVerification/id2");
-  BOOST_REQUIRE(addIdentity(identity2, RsaKeyParams()));
+  addIdentity(identity2, RsaKeyParams());
   Name keyName2 = m_keyChain.getDefaultKeyNameForIdentity(identity2);
   shared_ptr<v1::PublicKey> publicKey2 = m_keyChain.getPublicKey(keyName2);
 
@@ -157,12 +157,12 @@
 BOOST_AUTO_TEST_CASE(EcdsaSignatureVerification)
 {
   Name identity("/TestValidator/EcdsaSignatureVerification");
-  BOOST_REQUIRE(addIdentity(identity, EcdsaKeyParams()));
+  addIdentity(identity, EcdsaKeyParams());
   Name keyName = m_keyChain.getDefaultKeyNameForIdentity(identity);
   shared_ptr<v1::PublicKey> publicKey = m_keyChain.getPublicKey(keyName);
 
   Name identity2("/TestValidator/EcdsaSignatureVerification/id2");
-  BOOST_REQUIRE(addIdentity(identity2, EcdsaKeyParams()));
+  addIdentity(identity2, EcdsaKeyParams());
   Name keyName2 = m_keyChain.getDefaultKeyNameForIdentity(identity2);
   shared_ptr<v1::PublicKey> publicKey2 = m_keyChain.getPublicKey(keyName2);
 
@@ -192,12 +192,12 @@
 BOOST_AUTO_TEST_CASE(EcdsaSignatureVerification2)
 {
   Name ecdsaIdentity("/SecurityTestValidator/EcdsaSignatureVerification2/ecdsa");
-  BOOST_REQUIRE(addIdentity(ecdsaIdentity, EcdsaKeyParams()));
+  addIdentity(ecdsaIdentity, EcdsaKeyParams());
   Name ecdsaCertName = m_keyChain.getDefaultCertificateNameForIdentity(ecdsaIdentity);
   shared_ptr<v1::IdentityCertificate> ecdsaCert = m_keyChain.getCertificate(ecdsaCertName);
 
   Name rsaIdentity("/SecurityTestValidator/EcdsaSignatureVerification2/rsa");
-  BOOST_REQUIRE(addIdentity(rsaIdentity, RsaKeyParams()));
+  addIdentity(rsaIdentity, RsaKeyParams());
   Name rsaCertName = m_keyChain.getDefaultCertificateNameForIdentity(rsaIdentity);
   shared_ptr<v1::IdentityCertificate> rsaCert = m_keyChain.getCertificate(rsaCertName);
 
diff --git a/tests/unit-tests/util/io.t.cpp b/tests/unit-tests/util/io.t.cpp
index fcb1f2b..e4dfa63 100644
--- a/tests/unit-tests/util/io.t.cpp
+++ b/tests/unit-tests/util/io.t.cpp
@@ -269,7 +269,7 @@
 {
   Name identity("/TestIo/IdCert");
   identity.appendVersion();
-  BOOST_REQUIRE(addIdentity(identity, RsaKeyParams()));
+  addIdentity(identity, RsaKeyParams());
   Name certName = m_keyChain.getDefaultCertificateNameForIdentity(identity);
   shared_ptr<security::v1::IdentityCertificate> idCert;
   BOOST_REQUIRE_NO_THROW(idCert = m_keyChain.getCertificate(certName));
diff --git a/tests/wscript b/tests/wscript
index ad31f19..89a06cc 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -16,7 +16,7 @@
     # core modules that can be shared between unit and integrated tests
     bld(features="cxx",
         target="boost-tests-base",
-        source="key-chain-fixture.cpp identity-management-fixture.cpp",
+        source="identity-management-fixture.cpp",
         use='ndn-cxx tests-base BOOST',
         includes='.',
         install_path=None)
