diff --git a/tests/database-fixture.hpp b/tests/database-fixture.hpp
new file mode 100644
index 0000000..fc9da55
--- /dev/null
+++ b/tests/database-fixture.hpp
@@ -0,0 +1,60 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017, 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.
+ *
+ * This file, originally written as part of NFD (Named Data Networking Forwarding Daemon),
+ * is a part of ndncert, a certificate management system based on NDN.
+ *
+ * ndncert 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.
+ *
+ * ndncert 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 copies of the GNU General Public License along with
+ * ndncert, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndncert authors and contributors.
+ */
+
+#ifndef NDNCERT_TESTS_DATABASE_FIXTURE_HPP
+#define NDNCERT_TESTS_DATABASE_FIXTURE_HPP
+
+#include "test-common.hpp"
+#include "identity-management-fixture.hpp"
+#include <boost/filesystem.hpp>
+
+namespace ndn {
+namespace ndncert {
+namespace tests {
+
+class DatabaseFixture : public IdentityManagementV2TimeFixture
+{
+public:
+  DatabaseFixture()
+  {
+    dbDir = boost::filesystem::path(getenv("HOME")) / ".ndn";
+  }
+
+  ~DatabaseFixture()
+  {
+    boost::filesystem::remove_all(dbDir);
+  }
+
+public:
+  boost::filesystem::path dbDir;
+};
+
+} // namespace tests
+} // namespace ndncert
+} // namespace ndn
+
+#endif // NDNCERT_TESTS_DATABASE_FIXTURE_HPP
diff --git a/tests/unit-tests/ca-memory.t.cpp b/tests/unit-tests/ca-memory.t.cpp
new file mode 100644
index 0000000..a717e31
--- /dev/null
+++ b/tests/unit-tests/ca-memory.t.cpp
@@ -0,0 +1,125 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2017, Regents of the University of California.
+ *
+ * This file is part of ndncert, a certificate management system based on NDN.
+ *
+ * ndncert 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.
+ *
+ * ndncert 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 copies of the GNU General Public License along with
+ * ndncert, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndncert authors and contributors.
+ */
+
+#include "identity-management-fixture.hpp"
+#include "ca-detail/ca-memory.hpp"
+#include "ca-detail/ca-sqlite.hpp"
+
+namespace ndn {
+namespace ndncert {
+namespace tests {
+
+BOOST_FIXTURE_TEST_SUITE(TestCaMemory, IdentityManagementV2TimeFixture)
+
+BOOST_AUTO_TEST_CASE(Initialization)
+{
+  BOOST_CHECK_NO_THROW(CaMemory storage);
+}
+
+BOOST_AUTO_TEST_CASE(CertificateOperations)
+{
+  CaMemory storage;
+
+  auto identity1 = addIdentity(Name("/ndn/site1"));
+  auto key1 = identity1.getDefaultKey();
+  auto cert1 = key1.getDefaultCertificate();
+
+  // add operation
+  BOOST_CHECK_NO_THROW(storage.addCertificate("123", cert1));
+
+  // get operation
+  BOOST_CHECK_EQUAL(storage.getCertificate("123"), cert1);
+
+  // list operation
+  auto allCerts = storage.listAllIssuedCertificates();
+  BOOST_CHECK_EQUAL(allCerts.size(), 1);
+
+  auto identity2 = addIdentity(Name("/ndn/site2"));
+  auto key2 = identity2.getDefaultKey();
+  auto cert2 = key2.getDefaultCertificate();
+  storage.addCertificate("456", cert2);
+
+  allCerts = storage.listAllIssuedCertificates();
+  BOOST_CHECK_EQUAL(allCerts.size(), 2);
+
+  BOOST_CHECK_NO_THROW(storage.deleteCertificate("123"));
+
+  allCerts = storage.listAllIssuedCertificates();
+  BOOST_CHECK_EQUAL(allCerts.size(), 1);
+
+  auto identity3 = addIdentity(Name("/ndn/site3"));
+  auto key3 = identity3.getDefaultKey();
+  auto cert3 = key3.getDefaultCertificate();
+
+  // update operation
+  BOOST_CHECK_NO_THROW(storage.updateCertificate("456", cert3));
+  BOOST_CHECK_EQUAL(storage.getCertificate("456"), cert3);
+}
+
+BOOST_AUTO_TEST_CASE(RequestOperations)
+{
+  CaMemory storage;
+
+  auto identity1 = addIdentity(Name("/ndn/site1"));
+  auto key1 = identity1.getDefaultKey();
+  auto cert1 = key1.getDefaultCertificate();
+
+  // add operation
+  CertificateRequest request1(Name("/ndn/site1"), "123", cert1);
+  BOOST_CHECK_NO_THROW(storage.addRequest(request1));
+
+  // get operation
+  auto result = storage.getRequest("123");
+  BOOST_CHECK_EQUAL(request1.getCert(), result.getCert());
+  BOOST_CHECK_EQUAL(request1.getStatus(), result.getStatus());
+  BOOST_CHECK_EQUAL(request1.getCaName(), result.getCaName());
+
+  JsonSection json;
+  json.put("code", "1234");
+
+  // update operation
+  CertificateRequest request2(Name("/ndn/site1"), "123", "need-verify", "EMAIL",
+                              CaSqlite::convertJson2String(json), cert1);
+  storage.updateRequest(request2);
+  result = storage.getRequest("123");
+  BOOST_CHECK_EQUAL(request2.getCert(), result.getCert());
+  BOOST_CHECK_EQUAL(request2.getStatus(), result.getStatus());
+  BOOST_CHECK_EQUAL(request2.getCaName(), result.getCaName());
+
+  auto identity2 = addIdentity(Name("/ndn/site2"));
+  auto key2 = identity2.getDefaultKey();
+  auto cert2 = key2.getDefaultCertificate();
+  CertificateRequest request3(Name("/ndn/site2"), "456", cert2);
+  storage.addRequest(request3);
+
+  // list operation
+  auto allRequests = storage.listAllRequests();
+  BOOST_CHECK_EQUAL(allRequests.size(), 2);
+
+  storage.deleteRequest("456");
+  allRequests = storage.listAllRequests();
+  BOOST_CHECK_EQUAL(allRequests.size(), 1);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // TestCaModule
+
+} // namespace tests
+} // namespace ndncert
+} // namespace ndn
diff --git a/tests/unit-tests/ca-module.t.cpp b/tests/unit-tests/ca-module.t.cpp
index 33c81ee..0142755 100644
--- a/tests/unit-tests/ca-module.t.cpp
+++ b/tests/unit-tests/ca-module.t.cpp
@@ -18,7 +18,7 @@
  * See AUTHORS.md for complete list of ndncert authors and contributors.
  */
 
-#include "identity-management-fixture.hpp"
+#include "database-fixture.hpp"
 #include "ca-module.hpp"
 #include "client-module.hpp"
 #include "challenge-module.hpp"
@@ -31,7 +31,7 @@
 namespace ndncert {
 namespace tests {
 
-BOOST_FIXTURE_TEST_SUITE(TestCaModule, IdentityManagementV2TimeFixture)
+BOOST_FIXTURE_TEST_SUITE(TestCaModule, DatabaseFixture)
 
 BOOST_AUTO_TEST_CASE(Initialization)
 {
diff --git a/tests/unit-tests/ca-sqlite.t.cpp b/tests/unit-tests/ca-sqlite.t.cpp
index 496d7ae..be4b54d 100644
--- a/tests/unit-tests/ca-sqlite.t.cpp
+++ b/tests/unit-tests/ca-sqlite.t.cpp
@@ -18,43 +18,73 @@
  * See AUTHORS.md for complete list of ndncert authors and contributors.
  */
 
-#include "identity-management-fixture.hpp"
+#include "database-fixture.hpp"
 #include "ca-detail/ca-sqlite.hpp"
 
 namespace ndn {
 namespace ndncert {
 namespace tests {
 
-BOOST_FIXTURE_TEST_SUITE(TestCaSqlite, IdentityManagementV2TimeFixture)
+BOOST_FIXTURE_TEST_SUITE(TestCaSqlite, DatabaseFixture)
 
 BOOST_AUTO_TEST_CASE(Initialization)
 {
-  BOOST_CHECK_NO_THROW(CaSqlite storage);
+  BOOST_CHECK_NO_THROW(CaSqlite storage(dbDir.string()));
 }
 
 BOOST_AUTO_TEST_CASE(CertificateOperations)
 {
-  CaSqlite storage;
+  CaSqlite storage(dbDir.string());
 
-  auto identity = addIdentity(Name("/ndn/site1"));
-  auto key = identity.getDefaultKey();
-  auto cert = key.getDefaultCertificate();
+  auto identity1 = addIdentity(Name("/ndn/site1"));
+  auto key1 = identity1.getDefaultKey();
+  auto cert1 = key1.getDefaultCertificate();
 
-  BOOST_CHECK_NO_THROW(storage.addCertificate("123", cert));
-  auto result = storage.getCertificate("123");
-  BOOST_CHECK_EQUAL(cert, result);
+  // add operation
+  BOOST_CHECK_NO_THROW(storage.addCertificate("123", cert1));
+
+  // get operation
+  BOOST_CHECK_EQUAL(storage.getCertificate("123"), cert1);
+
+  // list operation
+  auto allCerts = storage.listAllIssuedCertificates();
+  BOOST_CHECK_EQUAL(allCerts.size(), 1);
+
+  auto identity2 = addIdentity(Name("/ndn/site2"));
+  auto key2 = identity2.getDefaultKey();
+  auto cert2 = key2.getDefaultCertificate();
+  storage.addCertificate("456", cert2);
+
+  allCerts = storage.listAllIssuedCertificates();
+  BOOST_CHECK_EQUAL(allCerts.size(), 2);
+
+  BOOST_CHECK_NO_THROW(storage.deleteCertificate("123"));
+
+  allCerts = storage.listAllIssuedCertificates();
+  BOOST_CHECK_EQUAL(allCerts.size(), 1);
+
+  auto identity3 = addIdentity(Name("/ndn/site3"));
+  auto key3 = identity3.getDefaultKey();
+  auto cert3 = key3.getDefaultCertificate();
+
+  // update operation
+  BOOST_CHECK_NO_THROW(storage.updateCertificate("456", cert3));
+  BOOST_CHECK_EQUAL(storage.getCertificate("456"), cert3);
 }
 
 BOOST_AUTO_TEST_CASE(RequestOperations)
 {
-  CaSqlite storage;
+  CaSqlite storage(dbDir.string());
 
-  auto identity = addIdentity(Name("/ndn/site2"));
-  auto key = identity.getDefaultKey();
-  auto cert = key.getDefaultCertificate();
+  auto identity1 = addIdentity(Name("/ndn/site1"));
+  auto key1 = identity1.getDefaultKey();
+  auto cert1 = key1.getDefaultCertificate();
 
-  CertificateRequest request1(Name("/ndn/site2"), "123", cert);
+  // add operation
+  CertificateRequest request1(Name("/ndn/site1"), "123", cert1);
   BOOST_CHECK_NO_THROW(storage.addRequest(request1));
+
+  // get operation
   auto result = storage.getRequest("123");
   BOOST_CHECK_EQUAL(request1.getCert(), result.getCert());
   BOOST_CHECK_EQUAL(request1.getStatus(), result.getStatus());
@@ -62,16 +92,33 @@
 
   JsonSection json;
   json.put("code", "1234");
-  std::stringstream ss;
-  boost::property_tree::write_json(ss, json);
-  std::string jsonValue = ss.str();
 
-  CertificateRequest request2(Name("/ndn/site2"), "123", "need-verify", "EMAIL", jsonValue, cert);
+  // update operation
+  CertificateRequest request2(Name("/ndn/site1"), "123", "need-verify", "EMAIL",
+                              CaSqlite::convertJson2String(json), cert1);
   storage.updateRequest(request2);
   result = storage.getRequest("123");
   BOOST_CHECK_EQUAL(request2.getCert(), result.getCert());
   BOOST_CHECK_EQUAL(request2.getStatus(), result.getStatus());
   BOOST_CHECK_EQUAL(request2.getCaName(), result.getCaName());
+
+  auto identity2 = addIdentity(Name("/ndn/site2"));
+  auto key2 = identity2.getDefaultKey();
+  auto cert2 = key2.getDefaultCertificate();
+  CertificateRequest request3(Name("/ndn/site2"), "456", cert2);
+  storage.addRequest(request3);
+
+  // list operation
+  auto allRequests = storage.listAllRequests();
+  BOOST_CHECK_EQUAL(allRequests.size(), 2);
+
+  storage.deleteRequest("456");
+  allRequests = storage.listAllRequests();
+  BOOST_CHECK_EQUAL(allRequests.size(), 1);
+
+  storage.deleteRequest("123");
+  allRequests = storage.listAllRequests();
+  BOOST_CHECK_EQUAL(allRequests.size(), 0);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestCaModule
