diff --git a/src/daemon/rrset-factory.cpp b/src/daemon/rrset-factory.cpp
index 2830dac..9757abc 100644
--- a/src/daemon/rrset-factory.cpp
+++ b/src/daemon/rrset-factory.cpp
@@ -27,12 +27,12 @@
 
 NDNS_LOG_INIT("RrsetFactory")
 
-RrsetFactory::RrsetFactory(const std::string& dbFile,
+RrsetFactory::RrsetFactory(const boost::filesystem::path& dbFile,
                            const Name& zoneName,
                            KeyChain& keyChain,
                            const Name& inputDskCertName)
   : m_keyChain(keyChain)
-  , m_dbFile(dbFile)
+  , m_dbFile(dbFile.string())
   , m_zone(zoneName)
   , m_dskCertName(inputDskCertName)
   , m_checked(false)
diff --git a/src/daemon/rrset-factory.hpp b/src/daemon/rrset-factory.hpp
index 083b8a5..e6c5455 100644
--- a/src/daemon/rrset-factory.hpp
+++ b/src/daemon/rrset-factory.hpp
@@ -31,6 +31,7 @@
 
 #include <vector>
 #include <string>
+#include <boost/filesystem.hpp>
 
 namespace ndn {
 namespace ndns {
@@ -50,7 +51,7 @@
   };
 
 public:
-  RrsetFactory(const std::string& dbFile,
+  RrsetFactory(const boost::filesystem::path& dbFile,
                const Name& zoneName,
                KeyChain& keyChain,
                const Name& inputDskCertName);
diff --git a/tests/unit/daemon/rrset-factory.cpp b/tests/unit/daemon/rrset-factory.cpp
new file mode 100644
index 0000000..39476ec
--- /dev/null
+++ b/tests/unit/daemon/rrset-factory.cpp
@@ -0,0 +1,188 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017, Regents of the University of California.
+ *
+ * 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
+ * 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.
+ *
+ * NDNS 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
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "daemon/rrset-factory.hpp"
+
+#include "test-common.hpp"
+#include "mgmt/management-tool.hpp"
+
+#include <boost/lexical_cast.hpp>
+#include <ndn-cxx/security/validator.hpp>
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+NDNS_LOG_INIT("RrsetFactoryTest")
+
+class RrsetFactoryFixture : public IdentityManagementFixture
+{
+public:
+  RrsetFactoryFixture()
+    : TEST_DATABASE2(TEST_CONFIG_PATH "/" "test-ndns.db"),
+      TEST_IDENTITY_NAME("/rrest/factory"),
+      TEST_CERT(TEST_CONFIG_PATH "/" "anchors/root.cert"),
+      m_session(TEST_DATABASE2.string()),
+      m_zoneName(TEST_IDENTITY_NAME)
+  {
+    Zone zone1;
+    zone1.setName(m_zoneName);
+    zone1.setTtl(time::seconds(4600));
+    BOOST_CHECK_NO_THROW(m_session.insert(zone1));
+
+    this->addIdentity(TEST_IDENTITY_NAME);
+    m_certName = m_keyChain.getDefaultCertificateNameForIdentity(TEST_IDENTITY_NAME);
+    ndn::io::save(*(m_keyChain.getCertificate(m_certName)), TEST_CERT.string());
+
+    NDNS_LOG_INFO("save test root cert " << m_certName << " to: " << TEST_CERT.string());
+    BOOST_CHECK_GT(m_certName.size(), 0);
+    NDNS_LOG_TRACE("test certName: " << m_certName);
+  }
+
+  ~RrsetFactoryFixture()
+  {
+    m_session.close();
+    boost::filesystem::remove(TEST_DATABASE2);
+    NDNS_LOG_INFO("remove database " << TEST_DATABASE2);
+    boost::filesystem::remove(TEST_CERT);
+  }
+
+public:
+  const boost::filesystem::path TEST_DATABASE2;
+  const Name TEST_IDENTITY_NAME;
+  const boost::filesystem::path TEST_CERT;
+  ndns::DbMgr m_session;
+  Name m_zoneName;
+  Name m_certName;
+};
+
+BOOST_FIXTURE_TEST_SUITE(RrsetFactoryTest,  RrsetFactoryFixture)
+
+BOOST_AUTO_TEST_CASE(CheckZoneKey)
+{
+  // zone throws check: zone not exists
+  RrsetFactory rf1(TEST_DATABASE2, "/not/exist/zone", m_keyChain, m_certName);
+  BOOST_CHECK_THROW(rf1.checkZoneKey(), ndns::RrsetFactory::Error);
+
+  // cert throws check: !matchCertificate
+  RrsetFactory rf2(TEST_DATABASE2, m_zoneName, m_keyChain, "wrongCert");
+  BOOST_CHECK_THROW(rf2.checkZoneKey(), ndns::RrsetFactory::Error);
+
+  RrsetFactory rf3(TEST_DATABASE2, m_zoneName, m_keyChain, m_certName);
+  BOOST_CHECK_NO_THROW(rf3.checkZoneKey());
+}
+
+BOOST_AUTO_TEST_CASE(GenerateNsRrset)
+{
+  Name label("/nstest");
+  name::Component type = label::NS_RR_TYPE;
+  uint64_t version = 1234;
+  time::seconds ttl(2000);
+  Zone zone(m_zoneName);
+  m_session.find(zone);
+
+  RrsetFactory rf(TEST_DATABASE2, m_zoneName, m_keyChain, m_certName);
+
+  // rf without checkZoneKey: throw.
+  ndn::Link::DelegationSet delegations;
+  BOOST_CHECK_THROW(rf.generateNsRrset(label, type, version, ttl, delegations),
+                    ndns::RrsetFactory::Error);
+  rf.checkZoneKey();
+
+  for (int i = 1; i <= 4; i++) {
+    Name name("/delegation/" + std::to_string(i));
+    delegations.insert(std::pair<uint32_t, Name>(i, name));
+  }
+
+  Rrset rrset = rf.generateNsRrset(label, type, version, ttl, delegations);
+
+  BOOST_CHECK_EQUAL(rrset.getId(), 0);
+  BOOST_REQUIRE(rrset.getZone() != nullptr);
+  BOOST_CHECK_EQUAL(*rrset.getZone(), zone);
+  BOOST_CHECK_EQUAL(rrset.getLabel(), label);
+  BOOST_CHECK_EQUAL(rrset.getType(), type);
+  BOOST_CHECK_EQUAL(rrset.getVersion().toVersion(), version);
+  BOOST_CHECK_EQUAL(rrset.getTtl(), ttl);
+
+  const Name linkName("/rrest/factory/NDNS/nstest/NS/%FD%04%D2");
+  Link link;
+  BOOST_CHECK_NO_THROW(link.wireDecode(rrset.getData()));
+
+  BOOST_CHECK_EQUAL(link.getName(), linkName);
+  BOOST_CHECK_EQUAL(link.getContentType(), NDNS_LINK);
+  BOOST_CHECK(link.getDelegations() == delegations);
+
+  shared_ptr<IdentityCertificate> cert = m_keyChain.getCertificate(m_certName);
+  BOOST_CHECK_EQUAL(Validator::verifySignature(link, cert->getPublicKeyInfo()), true);
+}
+
+BOOST_AUTO_TEST_CASE(GenerateTxtRrset)
+{
+  Name label("/txttest");
+  name::Component type = label::TXT_RR_TYPE;
+  uint64_t version = 1234;
+  time::seconds ttl(2000);
+  std::vector<std::string> txts;
+  Zone zone(m_zoneName);
+  m_session.find(zone);
+
+  RrsetFactory rf(TEST_DATABASE2, m_zoneName, m_keyChain, m_certName);
+
+  // rf without checkZoneKey: throw.
+  BOOST_CHECK_THROW(rf.generateTxtRrset(label, type, version, ttl, txts),
+                    ndns::RrsetFactory::Error);
+  rf.checkZoneKey();
+  BOOST_CHECK_NO_THROW(rf.generateTxtRrset(label, type, version, ttl, txts));
+  rf.checkZoneKey();
+
+  for (int i = 1; i <= 4; i++) {
+    txts.push_back(std::to_string(i));
+  }
+
+  Rrset rrset = rf.generateTxtRrset(label, type, version, ttl, txts);
+
+  BOOST_CHECK_EQUAL(rrset.getId(), 0);
+  BOOST_CHECK_EQUAL(*rrset.getZone(), zone);
+  BOOST_CHECK_EQUAL(rrset.getLabel(), label);
+  BOOST_CHECK_EQUAL(rrset.getType(), type);
+  BOOST_CHECK_EQUAL(rrset.getVersion().toVersion(), version);
+  BOOST_CHECK_EQUAL(rrset.getTtl(), ttl);
+
+  Name dataName = m_zoneName.append(label::NDNS_ITERATIVE_QUERY)
+                            .append(label)
+                            .append(type)
+                            .append(rrset.getVersion());
+
+  Data data;
+  BOOST_CHECK_NO_THROW(data.wireDecode(rrset.getData()));
+
+  BOOST_CHECK_EQUAL(data.getName(), dataName);
+  BOOST_CHECK_EQUAL(data.getContentType(), NDNS_RESP);
+
+  BOOST_CHECK(txts == RrsetFactory::wireDecodeTxt(data.getContent()));
+
+  shared_ptr<IdentityCertificate> cert = m_keyChain.getCertificate(m_certName);
+  BOOST_CHECK(Validator::verifySignature(data, cert->getPublicKeyInfo()));
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
