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
diff --git a/tests/test-conf-file-processor.cpp b/tests/test-conf-file-processor.cpp
index e5f709d..50cc872 100644
--- a/tests/test-conf-file-processor.cpp
+++ b/tests/test-conf-file-processor.cpp
@@ -471,6 +471,53 @@
   BOOST_CHECK_EQUAL(processConfigurationString(SECTION_GENERAL_NEGATIVE_VALUE), false);
 }
 
+BOOST_AUTO_TEST_CASE(LoadCertToPublish)
+{
+  ndn::Name identity("/TestNLSR/identity");
+  identity.appendVersion();
+
+  ndn::KeyChain keyChain;
+  keyChain.createIdentity(identity);
+  ndn::Name certName = keyChain.getDefaultCertificateNameForIdentity(identity);
+  shared_ptr<ndn::IdentityCertificate> certificate = keyChain.getCertificate(certName);
+
+  const boost::filesystem::path CERT_PATH =
+      (boost::filesystem::current_path() / std::string("cert-to-publish.cert"));
+  ndn::io::save(*certificate, CERT_PATH.string());
+
+  const std::string SECTION_SECURITY =
+  "security\n"
+  "{\n"
+  "  validator\n"
+  "  {\n"
+  "    trust-anchor\n"
+  "    {\n"
+  "      type any\n"
+  "    }\n"
+  "  }\n"
+  "  prefix-update-validator\n"
+  "  {\n"
+  "    trust-anchor\n"
+  "    {\n"
+  "      type any\n"
+  "    }\n"
+  "  }\n"
+  "  cert-to-publish \"cert-to-publish.cert\"\n"
+  "}\n\n";
+
+  BOOST_CHECK(processConfigurationString(SECTION_SECURITY));
+
+  // Certificate should now be in the CertificateStore
+  const security::CertificateStore& certStore = nlsr.getCertificateStore();
+  const ndn::Name certKey = certificate->getName().getPrefix(-1);
+
+  BOOST_CHECK(certStore.find(certKey) != nullptr);
+
+  // Cleanup
+  keyChain.deleteIdentity(identity);
+  boost::filesystem::remove(CERT_PATH);
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } //namespace test
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index ed41d9b..ee9b7e7 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -1,7 +1,8 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  University of Memphis,
- *                     Regents of the University of California
+ * 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.
@@ -16,8 +17,6 @@
  *
  * 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 "test-common.hpp"
@@ -279,6 +278,38 @@
   BOOST_CHECK_EQUAL(parameters.getName(), nameToAdvertise);
 }
 
+BOOST_FIXTURE_TEST_CASE(GetCertificate, UnitTestTimeFixture)
+{
+  shared_ptr<ndn::util::DummyClientFace> face = ndn::util::makeDummyClientFace(g_ioService);
+  Nlsr nlsr(g_ioService, g_scheduler, ndn::ref(*face));
+
+  // Create certificate
+  ndn::Name identity("/TestNLSR/identity");
+  identity.appendVersion();
+
+  ndn::KeyChain keyChain;
+  keyChain.createIdentity(identity);
+  ndn::Name certName = keyChain.getDefaultCertificateNameForIdentity(identity);
+  shared_ptr<ndn::IdentityCertificate> certificate = keyChain.getCertificate(certName);
+
+  const ndn::Name certKey = certificate->getName().getPrefix(-1);
+
+  BOOST_CHECK(nlsr.getCertificate(certKey) == nullptr);
+
+  // Certificate should be retrievable from the CertificateStore
+  nlsr.loadCertToPublish(certificate);
+
+  BOOST_CHECK(nlsr.getCertificate(certKey) != nullptr);
+
+  nlsr.getCertificateStore().clear();
+
+  // Certificate should be retrievable from the cache
+  nlsr.addCertificateToCache(certificate);
+  this->advanceClocks(ndn::time::milliseconds(10));
+
+  BOOST_CHECK(nlsr.getCertificate(certKey) != nullptr);
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } //namespace test
