tests: add FreshnessPeriod where MustBeFresh is used

Also, set MustBeFresh in autoconfig-server HubData test,
to reflect the behavior of autoconfig client.

refs #4913

Change-Id: I0af29378630a2208e98ef0913d83668a603e9a88
diff --git a/tests/tools/mock-nfd-mgmt-fixture.hpp b/tests/tools/mock-nfd-mgmt-fixture.hpp
index 1e1d592..7b43ea9 100644
--- a/tests/tools/mock-nfd-mgmt-fixture.hpp
+++ b/tests/tools/mock-nfd-mgmt-fixture.hpp
@@ -191,6 +191,7 @@
     }
 
     auto data = make_shared<Data>(name);
+    data->setFreshnessPeriod(1_s);
     data->setFinalBlock(name[-1]);
     data->setContent(std::forward<ContentArgs>(contentArgs)...);
     this->signDatasetReply(*data);
diff --git a/tests/tools/ndn-autoconfig-server/program.t.cpp b/tests/tools/ndn-autoconfig-server/program.t.cpp
index 4e78bef..cc007ce 100644
--- a/tests/tools/ndn-autoconfig-server/program.t.cpp
+++ b/tests/tools/ndn-autoconfig-server/program.t.cpp
@@ -67,6 +67,7 @@
   this->initialize(options);
 
   Interest interest("/localhop/ndn-autoconf/hub");
+  interest.setMustBeFresh(true);
   face.receive(interest);
   face.processEvents(500_ms);
 
diff --git a/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp b/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
index 62d8bf1..0834bf5 100644
--- a/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
+++ b/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
@@ -100,6 +100,7 @@
     if (interest.getName() == "/localhop/ndn-autoconf/hub") {
       const char FACEURI[] = "udp://router.example.net";
       auto data = makeData(Name("/localhop/ndn-autoconf/hub").appendVersion());
+      data->setFreshnessPeriod(1_s);
       data->setContent(makeBinaryBlock(tlv::nfd::Uri, FACEURI, ::strlen(FACEURI)));
       face.receive(*data);
       return;