diff --git a/tests/security/test-certificate-store.cpp b/tests/security/test-certificate-store.cpp
new file mode 100644
index 0000000..0ede9bf
--- /dev/null
+++ b/tests/security/test-certificate-store.cpp
@@ -0,0 +1,77 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  The University of Memphis,
+ *                           Regents of the University of California,
+ *                           Arizona Board of Regents.
+ *
+ * This file is part of NLSR (Named-data Link State Routing).
+ * See AUTHORS.md for complete list of NLSR authors and contributors.
+ *
+ * NLSR 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.
+ *
+ * NLSR 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
+ * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ **/
+
+#include "security/certificate-store.hpp"
+
+#include "../test-common.hpp"
+
+#include <ndn-cxx/security/key-chain.hpp>
+
+namespace nlsr {
+namespace security {
+namespace test {
+
+using std::shared_ptr;
+
+class CertificateStoreFixture
+{
+public:
+  CertificateStoreFixture()
+  {
+    // Create certificate
+    ndn::Name identity("/TestNLSR/identity");
+    identity.appendVersion();
+
+    ndn::KeyChain keyChain;
+    keyChain.createIdentity(identity);
+    ndn::Name certName = keyChain.getDefaultCertificateNameForIdentity(identity);
+    certificate = keyChain.getCertificate(certName);
+
+    BOOST_REQUIRE(certificate != nullptr);
+
+    certificateKey = certificate->getName().getPrefix(-1);
+  }
+
+public:
+  shared_ptr<ndn::IdentityCertificate> certificate;
+  ndn::Name certificateKey;
+};
+
+BOOST_FIXTURE_TEST_SUITE(TestSecurityCertificateStore, CertificateStoreFixture)
+
+BOOST_AUTO_TEST_CASE(Basic)
+{
+  CertificateStore store;
+
+  BOOST_REQUIRE(store.find(certificateKey) == nullptr);
+  store.insert(certificate);
+
+  BOOST_CHECK(*store.find(certificateKey) == *certificate);
+
+  store.clear();
+  BOOST_REQUIRE(store.find(certificateKey) == nullptr);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace test
+} // namespace security
+} // namespace nlsr
