diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
index f8b9c35..847bb6b 100644
--- a/tests/identity-management-fixture.cpp
+++ b/tests/identity-management-fixture.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2018, Regents of the University of California
+ * Copyright (c) 2014-2020, Regents of the University of California
  *
  * NAC 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
@@ -20,7 +20,7 @@
 #include "identity-management-fixture.hpp"
 
 #include <ndn-cxx/util/io.hpp>
-#include <ndn-cxx/security/v2/additional-description.hpp>
+#include <ndn-cxx/security/additional-description.hpp>
 
 #include <boost/filesystem.hpp>
 
@@ -28,8 +28,6 @@
 namespace nac {
 namespace tests {
 
-namespace v2 = security::v2;
-
 IdentityManagementFixture::IdentityManagementFixture()
   : m_keyChain("pib-memory:", "tpm-memory:")
 {
@@ -43,7 +41,7 @@
   }
 }
 
-security::Identity
+Identity
 IdentityManagementFixture::addIdentity(const Name& identityName, const KeyParams& params)
 {
   auto identity = m_keyChain.createIdentity(identityName, params);
@@ -52,7 +50,7 @@
 }
 
 bool
-IdentityManagementFixture::saveIdentityCertificate(const security::Identity& identity,
+IdentityManagementFixture::saveIdentityCertificate(const Identity& identity,
                                                    const std::string& filename)
 {
   try {
@@ -64,13 +62,13 @@
   }
 }
 
-security::Identity
+Identity
 IdentityManagementFixture::addSubCertificate(const Name& subIdentityName,
-                                             const security::Identity& issuer, const KeyParams& params)
+                                             const Identity& issuer, const KeyParams& params)
 {
   auto subIdentity = addIdentity(subIdentityName, params);
 
-  v2::Certificate request = subIdentity.getDefaultKey().getDefaultCertificate();
+  Certificate request = subIdentity.getDefaultKey().getDefaultCertificate();
 
   request.setName(request.getKeyName().append("parent").appendVersion());
 
@@ -78,7 +76,7 @@
   info.setValidityPeriod(security::ValidityPeriod(time::system_clock::now(),
                                                   time::system_clock::now() + time::days(7300)));
 
-  v2::AdditionalDescription description;
+  security::AdditionalDescription description;
   description.set("type", "sub-certificate");
   info.appendTypeSpecificTlv(description.wireEncode());
 
@@ -88,14 +86,14 @@
   return subIdentity;
 }
 
-v2::Certificate
+Certificate
 IdentityManagementFixture::addCertificate(const security::Key& key, const std::string& issuer)
 {
   Name certificateName = key.getName();
   certificateName
     .append(issuer)
     .appendVersion();
-  v2::Certificate certificate;
+  Certificate certificate;
   certificate.setName(certificateName);
 
   // set metainfo
diff --git a/tests/identity-management-fixture.hpp b/tests/identity-management-fixture.hpp
index 96cbc7f..d76e3fa 100644
--- a/tests/identity-management-fixture.hpp
+++ b/tests/identity-management-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2018, Regents of the University of California
+ * Copyright (c) 2014-2020, Regents of the University of California
  *
  * NAC 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
@@ -20,9 +20,11 @@
 #ifndef NAC_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
 #define NAC_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
 
+#include "common.hpp"
+
 #include "boost-test.hpp"
 
-#include <ndn-cxx/security/v2/key-chain.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/security/signing-helpers.hpp>
 
 #include <vector>
@@ -48,8 +50,8 @@
    * @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());
+  Identity
+  addIdentity(const Name& identityName, const KeyParams& params = KeyChain::getDefaultKeyParams());
 
   /**
    *  @brief Save identity certificate to a file
@@ -58,7 +60,7 @@
    *  @return whether successful
    */
   bool
-  saveIdentityCertificate(const security::Identity& identity, const std::string& filename);
+  saveIdentityCertificate(const Identity& identity, const std::string& filename);
 
   /**
    * @brief Issue a certificate for \p subIdentityName signed by \p issuer
@@ -70,20 +72,20 @@
    *  @return the sub identity
    */
   security::Identity
-  addSubCertificate(const Name& subIdentityName, const security::Identity& issuer,
-                    const KeyParams& params = security::v2::KeyChain::getDefaultKeyParams());
+  addSubCertificate(const Name& subIdentityName, const Identity& issuer,
+                    const KeyParams& params = 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);
+  Certificate
+  addCertificate(const Key& key, const std::string& issuer);
 
   bool
   saveCertToFile(const Data& obj, const std::string& filename);
 
 protected:
-  security::v2::KeyChain m_keyChain;
+  KeyChain m_keyChain;
   std::set<Name> m_identities;
   std::set<std::string> m_certFiles;
 };
