diff --git a/tests/identity-management-fixture.hpp b/tests/identity-management-fixture.hpp
index 63c7fb7..6936914 100644
--- a/tests/identity-management-fixture.hpp
+++ b/tests/identity-management-fixture.hpp
@@ -1,15 +1,8 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
+/*
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
- * This file is part of NDNS (Named Data Networking Domain Name Service) and is
- * based on the code written as part of NFD (Named Data Networking Daemon).
+ * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
  *
  * NDNS is free software: you can redistribute it and/or modify it under the terms
@@ -24,60 +17,88 @@
  * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NDNS_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
-#define NDNS_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+#ifndef NDN_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+#define NDN_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
 
-#include "test-common.hpp"
+#include "boost-test.hpp"
+#include "test-home-fixture.hpp"
+
+#include <ndn-cxx/security/v2/key-chain.hpp>
+#include <ndn-cxx/security/signing-helpers.hpp>
+
+#include <vector>
 
 namespace ndn {
 namespace ndns {
 namespace tests {
 
-/** \brief a fixture that cleans up KeyChain identities and certificate files upon destruction
- */
-class IdentityManagementFixture : public virtual BaseFixture
+class IdentityManagementBaseFixture : public TestHomeFixture<DefaultPibDir>
 {
 public:
-  IdentityManagementFixture();
+  ~IdentityManagementBaseFixture();
 
-  /** \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);
+  saveCertToFile(const Data& obj, const std::string& filename);
 
 protected:
-  ndn::KeyChain m_keyChain;
-
-private:
-  std::vector<ndn::Name> m_identities;
-  std::vector<std::string> m_certFiles;
+  std::set<Name> m_identities;
+  std::set<std::string> m_certFiles;
 };
 
-/** \brief convenience base class for inheriting from both UnitTestTimeFixture
- *         and IdentityManagementFixture
+/**
+ * @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 IdentityManagementTimeFixture : public UnitTestTimeFixture
-                                    , public IdentityManagementFixture
+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());
+
+  /**
+   * @brief Add a self-signed certificate to @p key with issuer ID @p issuer
+   */
+  security::v2::Certificate
+  addCertificate(const security::Key& key, const std::string& issuer);
+
+protected:
+  security::v2::KeyChain m_keyChain;
 };
 
+using IdentityManagementFixture = IdentityManagementV2Fixture;
+
 } // namespace tests
 } // namespace ndns
 } // namespace ndn
 
-#endif // NDNS_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+#endif // NDN_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
