tests: add FreshnessPeriod where MustBeFresh is used

refs #4913

Change-Id: Idf7e85b46ea9530678b51bf1f472ecfcfca5773f
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index 71c1d08..9a648a0 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -29,17 +29,18 @@
 #include <boost/asio.hpp>
 #include <boost/test/unit_test.hpp>
 
-#include <ndn-cxx/util/scheduler.hpp>
-#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/util/time-unit-test-clock.hpp>
-
-#include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
 #include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
 #include <ndn-cxx/util/dummy-client-face.hpp>
+#include <ndn-cxx/util/scheduler.hpp>
+#include <ndn-cxx/util/time-unit-test-clock.hpp>
 
 namespace nlsr {
 namespace test {
 
+using namespace ndn::time_literals;
+
 ndn::Data&
 signData(ndn::Data& data);
 
@@ -154,6 +155,7 @@
     }
 
     auto data = make_shared<ndn::Data>(name);
+    data->setFreshnessPeriod(1_s);
     data->setFinalBlock(name[-1]);
     data->setContent(std::forward<ContentArgs>(contentArgs)...);
     this->signDatasetReply(*data);
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index 229c004..76b0fd3 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2019,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
@@ -17,7 +17,7 @@
  *
  * 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 "nlsr.hpp"
 #include "test-common.hpp"
@@ -153,6 +153,7 @@
     .setRemoteUri(faceUri)
     .setFaceId(faceId);
   auto data = std::make_shared<ndn::Data>("/localhost/nfd/faces/events/%FE%00");
+  data->setFreshnessPeriod(1_s);
   data->setContent(event.wireEncode());
   m_keyChain.sign(*data);
   m_face.receive(*data);
@@ -185,6 +186,7 @@
     .setRemoteUri(eventUri)
     .setFaceId(faceId);
   auto data = std::make_shared<ndn::Data>("/localhost/nfd/faces/events/%FE%00");
+  data->setFreshnessPeriod(1_s);
   data->setContent(event.wireEncode());
   m_keyChain.sign(*data);
   m_face.receive(*data);
@@ -215,6 +217,7 @@
     .setRemoteUri(faceUri)
     .setFaceId(eventFaceId);
   std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>("/localhost/nfd/faces/events/%FE%00");
+  data->setFreshnessPeriod(1_s);
   data->setContent(event.wireEncode());
   m_keyChain.sign(*data);
   m_face.receive(*data);
@@ -303,6 +306,7 @@
        .setFaceId(destroyFaceId);
 
   std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>("/localhost/nfd/faces/events/%FE%00");
+  data->setFreshnessPeriod(1_s);
   data->setContent(event.wireEncode());
   m_keyChain.sign(*data);