Update validation related codes to security v2

Change-Id: I5467b87092820666c04f22623f0f1665ce9a1194
diff --git a/tests/unit/daemon/db-mgr.cpp b/tests/unit/daemon/db-mgr.cpp
index 09fdc9f..4f730b9 100644
--- a/tests/unit/daemon/db-mgr.cpp
+++ b/tests/unit/daemon/db-mgr.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, Regents of the University of California.
+/*
+ * 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.
@@ -18,11 +18,10 @@
  */
 
 #include "daemon/db-mgr.hpp"
+#include "test-common.hpp"
 
 #include <algorithm>
 
-#include "test-common.hpp"
-
 namespace ndn {
 namespace ndns {
 namespace tests {
@@ -81,6 +80,25 @@
   BOOST_CHECK_EQUAL(zone2.getId(), 0);
 }
 
+BOOST_FIXTURE_TEST_CASE(ZoneInfo, DbMgrFixture)
+{
+  Zone zone;
+  zone.setName("/net");
+  BOOST_CHECK_NO_THROW(session.insert(zone));
+
+  Name name1 = Name("/ndn/test");
+  Name name2 = Name("/ndn/zzzzz");
+
+  BOOST_CHECK_NO_THROW(session.setZoneInfo(zone, "dsk", name1.wireEncode()));
+  BOOST_CHECK_NO_THROW(session.setZoneInfo(zone, "ksk", name2.wireEncode()));
+
+  std::map<std::string, Block> zoneInfo;
+  zoneInfo = session.getZoneInfo(zone);
+
+  BOOST_CHECK_EQUAL(Name(zoneInfo["dsk"]), name1);
+  BOOST_CHECK_EQUAL(Name(zoneInfo["ksk"]), name2);
+}
+
 BOOST_FIXTURE_TEST_CASE(Rrsets, DbMgrFixture)
 {
   Zone zone("/net");
@@ -89,7 +107,7 @@
   // Add
 
   rrset1.setLabel("/net/ksk-123");
-  rrset1.setType(name::Component("ID-CERT"));
+  rrset1.setType(name::Component("CERT"));
   rrset1.setVersion(name::Component::fromVersion(567));
   rrset1.setTtl(time::seconds(4600));
 
@@ -105,7 +123,7 @@
 
   Rrset rrset2(&zone);
   rrset2.setLabel("/net/ksk-123");
-  rrset2.setType(name::Component("ID-CERT"));
+  rrset2.setType(name::Component("CERT"));
 
   bool isFound = false;
   BOOST_CHECK_NO_THROW(isFound = session.find(rrset2));
@@ -128,7 +146,7 @@
 
   rrset2 = Rrset(&zone);
   rrset2.setLabel("/net/ksk-123");
-  rrset2.setType(name::Component("ID-CERT"));
+  rrset2.setType(name::Component("CERT"));
 
   isFound = false;
   BOOST_CHECK_NO_THROW(isFound = session.find(rrset2));
@@ -147,7 +165,7 @@
 
   rrset2 = Rrset(&zone);
   rrset2.setLabel("/net/ksk-123");
-  rrset2.setType(name::Component("ID-CERT"));
+  rrset2.setType(name::Component("CERT"));
 
   isFound = false;
   BOOST_CHECK_NO_THROW(isFound = session.find(rrset2));
@@ -209,7 +227,7 @@
   Zone zone("/");
   Rrset rrset1(&zone);
   rrset1.setLabel("/net/ksk-123");
-  rrset1.setType(name::Component("ID-CERT"));
+  rrset1.setType(name::Component("CERT"));
   rrset1.setVersion(name::Component::fromVersion(567));
   rrset1.setTtl(time::seconds(4600));