diff --git a/tests/daemon/face/face.t.cpp b/tests/daemon/face/face.t.cpp
index 165d5db..346f609 100644
--- a/tests/daemon/face/face.t.cpp
+++ b/tests/daemon/face/face.t.cpp
@@ -106,33 +106,29 @@
   face1->afterReceiveNack.connect(bind([&nReceivedNacks] { ++nReceivedNacks; }));
 
   for (size_t i = 0; i < nInInterests; ++i) {
-    shared_ptr<Interest> interest = makeInterest("/JSQdqward4");
-    face1->receiveInterest(*interest, 0);
+    face1->receiveInterest(*makeInterest("/JSQdqward4"), 0);
   }
 
   for (size_t i = 0; i < nInData; ++i) {
-    shared_ptr<Data> data = makeData("/hT8FDigWn1");
-    face1->receiveData(*data, 0);
+    face1->receiveData(*makeData("/hT8FDigWn1"), 0);
   }
 
   for (size_t i = 0; i < nInNacks; ++i) {
-    lp::Nack nack = makeNack("/StnEVTj4Ex", 561, lp::NackReason::CONGESTION);
-    face1->receiveNack(nack, 0);
+    face1->receiveNack(makeNack(*makeInterest("/StnEVTj4Ex", false, nullopt, 561),
+                                lp::NackReason::CONGESTION), 0);
   }
 
   for (size_t i = 0; i < nOutInterests; ++i) {
-    shared_ptr<Interest> interest = makeInterest("/XyUAFYQDmd");
-    face1->sendInterest(*interest, 0);
+    face1->sendInterest(*makeInterest("/XyUAFYQDmd"), 0);
   }
 
   for (size_t i = 0; i < nOutData; ++i) {
-    shared_ptr<Data> data = makeData("/GigPEtPH6");
-    face1->sendData(*data, 0);
+    face1->sendData(*makeData("/GigPEtPH6"), 0);
   }
 
   for (size_t i = 0; i < nOutNacks; ++i) {
-    lp::Nack nack = makeNack("/9xK6FbwIBM", 365, lp::NackReason::CONGESTION);
-    face1->sendNack(nack, 0);
+    face1->sendNack(makeNack(*makeInterest("/9xK6FbwIBM", false, nullopt, 365),
+                             lp::NackReason::CONGESTION), 0);
   }
 
   BOOST_CHECK_EQUAL(face1->getCounters().nInInterests, nInInterests);
diff --git a/tests/daemon/face/generic-link-service.t.cpp b/tests/daemon/face/generic-link-service.t.cpp
index fc5efc2..8f0dbae 100644
--- a/tests/daemon/face/generic-link-service.t.cpp
+++ b/tests/daemon/face/generic-link-service.t.cpp
@@ -139,7 +139,8 @@
   options.allowLocalFields = false;
   initialize(options);
 
-  auto nack1 = makeNack("/localhost/test", 323, lp::NackReason::NO_ROUTE);
+  auto nack1 = makeNack(*makeInterest("/localhost/test", false, nullopt, 323),
+                        lp::NackReason::NO_ROUTE);
   face->sendNack(nack1, 0);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutNacks, 1);
@@ -172,7 +173,7 @@
   options.allowLocalFields = false;
   initialize(options);
 
-  shared_ptr<Interest> interest1 = makeInterest("/23Rd9hEiR");
+  auto interest1 = makeInterest("/23Rd9hEiR");
   lp::Packet lpPacket;
   lpPacket.set<lp::FragmentField>(std::make_pair(
     interest1->wireEncode().begin(), interest1->wireEncode().end()));
@@ -207,7 +208,7 @@
   options.allowLocalFields = false;
   initialize(options);
 
-  shared_ptr<Data> data1 = makeData("/12345689");
+  auto data1 = makeData("/12345689");
   lp::Packet lpPacket;
   lpPacket.set<lp::FragmentField>(std::make_pair(
     data1->wireEncode().begin(), data1->wireEncode().end()));
@@ -227,7 +228,8 @@
   options.allowLocalFields = false;
   initialize(options);
 
-  lp::Nack nack1 = makeNack("/localhost/test", 323, lp::NackReason::NO_ROUTE);
+  lp::Nack nack1 = makeNack(*makeInterest("/localhost/test", false, nullopt, 323),
+                            lp::NackReason::NO_ROUTE);
   lp::Packet lpPacket;
   lpPacket.set<lp::FragmentField>(std::make_pair(
     nack1.getInterest().wireEncode().begin(), nack1.getInterest().wireEncode().end()));
@@ -273,7 +275,7 @@
 
   transport->setMtu(55);
 
-  shared_ptr<Data> data = makeData("/test/data/123456789/987654321/123456789");
+  auto data = makeData("/test/data/123456789/987654321/123456789");
   face->sendData(*data, 0);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 0);
@@ -289,7 +291,7 @@
 
   transport->setMtu(MTU_UNLIMITED);
 
-  shared_ptr<Data> data = makeData("/test/data/123456789/987654321/123456789");
+  auto data = makeData("/test/data/123456789/987654321/123456789");
   face->sendData(*data, 0);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 1);
@@ -304,7 +306,7 @@
 
   transport->setMtu(105);
 
-  shared_ptr<Data> data = makeData("/test/data/123456789/987654321/123456789");
+  auto data = makeData("/test/data/123456789/987654321/123456789");
   face->sendData(*data, 0);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 1);
@@ -319,7 +321,7 @@
 
   transport->setMtu(60);
 
-  shared_ptr<Data> data = makeData("/test/data/123456789/987654321/123456789");
+  auto data = makeData("/test/data/123456789/987654321/123456789");
   face->sendData(*data, 0);
 
   BOOST_CHECK_GT(transport->sentPackets.size(), 1);
@@ -332,7 +334,7 @@
   options.allowReassembly = true;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest(
+  auto interest = makeInterest(
     "/mt7P130BHXmtLm5dwaY5dpUM6SWYNN2B05g7y3UhsQuLvDdnTWdNnTeEiLuW3FAbJRSG3tzQ0UfaSEgG9rvYHmsKtgPMag1Hj4Tr");
   lp::Packet packet(interest->wireEncode());
 
@@ -371,7 +373,7 @@
   options.allowReassembly = false;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/IgFe6NvH");
+  auto interest = makeInterest("/IgFe6NvH");
   lp::Packet packet(interest->wireEncode());
   packet.set<lp::FragIndexField>(140);
 
@@ -388,7 +390,7 @@
   options.allowReassembly = false;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/SeGmEjvIVX");
+  auto interest = makeInterest("/SeGmEjvIVX");
   lp::Packet packet(interest->wireEncode());
   packet.set<lp::FragCountField>(276);
 
@@ -446,7 +448,8 @@
   options.reliabilityOptions.isEnabled = true;
   initialize(options);
 
-  auto nack1 = makeNack("/localhost/test", 323, lp::NackReason::NO_ROUTE);
+  auto nack1 = makeNack(*makeInterest("/localhost/test", false, nullopt, 323),
+                        lp::NackReason::NO_ROUTE);
   face->sendNack(nack1, 0);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutNacks, 1);
@@ -472,7 +475,7 @@
   BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
   BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
 
   // congestion threshold will be 32768 bytes, since min(65536, 65536 / 2) = 32768 bytes
 
@@ -508,7 +511,7 @@
   BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
   BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
 
   // congestion threshold will be 32768 bytes, since min(65536, 65536 / 2) = 32768 bytes
 
@@ -750,7 +753,7 @@
   BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
   BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
 
   // congestion threshold will be 65536 bytes, since the transport reports that it cannot measure
   // the queue capacity
@@ -799,7 +802,7 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   lp::Packet packet(interest->wireEncode());
   packet.set<lp::NextHopFaceIdField>(1000);
 
@@ -818,7 +821,7 @@
   options.allowLocalFields = false;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   lp::Packet packet(interest->wireEncode());
   packet.set<lp::NextHopFaceIdField>(1000);
 
@@ -835,7 +838,7 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  shared_ptr<Data> data = makeData("/12345678");
+  auto data = makeData("/12345678");
   lp::Packet packet(data->wireEncode());
   packet.set<lp::NextHopFaceIdField>(1000);
 
@@ -852,7 +855,8 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  lp::Nack nack = makeNack("/localhost/test", 123, lp::NackReason::NO_ROUTE);
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+                           lp::NackReason::NO_ROUTE);
   lp::Packet packet;
   packet.set<lp::FragmentField>(std::make_pair(
     nack.getInterest().wireEncode().begin(), nack.getInterest().wireEncode().end()));
@@ -873,7 +877,7 @@
   initialize(options);
   // CachePolicy is unprivileged and does not require allowLocalFields option.
 
-  shared_ptr<Data> data = makeData("/12345678");
+  auto data = makeData("/12345678");
   lp::Packet packet(data->wireEncode());
   packet.set<lp::CachePolicyField>(lp::CachePolicy().setPolicy(lp::CachePolicyType::NO_CACHE));
 
@@ -892,7 +896,7 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   lp::Packet packet(interest->wireEncode());
   lp::CachePolicy policy;
   policy.setPolicy(lp::CachePolicyType::NO_CACHE);
@@ -911,7 +915,8 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  lp::Nack nack = makeNack("/localhost/test", 123, lp::NackReason::NO_ROUTE);
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+                           lp::NackReason::NO_ROUTE);
   lp::Packet packet(nack.getInterest().wireEncode());
   packet.set<lp::NackField>(nack.getHeader());
   lp::CachePolicy policy;
@@ -931,7 +936,7 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::IncomingFaceIdTag>(1000));
 
   face->sendInterest(*interest, 0);
@@ -949,7 +954,7 @@
   options.allowLocalFields = false;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::IncomingFaceIdTag>(1000));
 
   face->sendInterest(*interest, 0);
@@ -966,7 +971,7 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   lp::Packet packet(interest->wireEncode());
   packet.set<lp::IncomingFaceIdField>(1000);
 
@@ -984,7 +989,7 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  shared_ptr<Data> data = makeData("/z1megUh9Bj");
+  auto data = makeData("/z1megUh9Bj");
   lp::Packet packet(data->wireEncode());
   packet.set<lp::IncomingFaceIdField>(1000);
 
@@ -1002,7 +1007,8 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  lp::Nack nack = makeNack("/TPAhdiHz", 278, lp::NackReason::CONGESTION);
+  lp::Nack nack = makeNack(*makeInterest("/TPAhdiHz", false, nullopt, 278),
+                           lp::NackReason::CONGESTION);
   lp::Packet packet(nack.getInterest().wireEncode());
   packet.set<lp::NackField>(nack.getHeader());
   packet.set<lp::IncomingFaceIdField>(1000);
@@ -1016,7 +1022,7 @@
 
 BOOST_AUTO_TEST_CASE(SendCongestionMarkInterest)
 {
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::CongestionMarkTag>(1));
 
   face->sendInterest(*interest, 0);
@@ -1029,7 +1035,7 @@
 
 BOOST_AUTO_TEST_CASE(SendCongestionMarkData)
 {
-  shared_ptr<Data> data = makeData("/12345678");
+  auto data = makeData("/12345678");
   data->setTag(make_shared<lp::CongestionMarkTag>(0));
 
   face->sendData(*data, 0);
@@ -1042,7 +1048,8 @@
 
 BOOST_AUTO_TEST_CASE(SendCongestionMarkNack)
 {
-  lp::Nack nack = makeNack("/localhost/test", 123, lp::NackReason::NO_ROUTE);
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+                           lp::NackReason::NO_ROUTE);
   nack.setTag(make_shared<lp::CongestionMarkTag>(std::numeric_limits<uint64_t>::max()));
 
   face->sendNack(nack, 0);
@@ -1055,7 +1062,7 @@
 
 BOOST_AUTO_TEST_CASE(ReceiveCongestionMarkInterest)
 {
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   lp::Packet packet(interest->wireEncode());
   packet.set<lp::CongestionMarkField>(1);
 
@@ -1069,7 +1076,7 @@
 
 BOOST_AUTO_TEST_CASE(ReceiveCongestionMarkData)
 {
-  shared_ptr<Data> data = makeData("/12345678");
+  auto data = makeData("/12345678");
   lp::Packet packet(data->wireEncode());
   packet.set<lp::CongestionMarkField>(1);
 
@@ -1083,7 +1090,8 @@
 
 BOOST_AUTO_TEST_CASE(ReceiveCongestionMarkNack)
 {
-  lp::Nack nack = makeNack("/localhost/test", 123, lp::NackReason::NO_ROUTE);
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+                           lp::NackReason::NO_ROUTE);
   lp::Packet packet;
   packet.set<lp::FragmentField>(std::make_pair(
     nack.getInterest().wireEncode().begin(), nack.getInterest().wireEncode().end()));
@@ -1104,7 +1112,7 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::NonDiscoveryTag>(lp::EmptyValue{}));
 
   face->sendInterest(*interest, 0);
@@ -1120,7 +1128,7 @@
   options.allowSelfLearning = false;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::NonDiscoveryTag>(lp::EmptyValue{}));
 
   face->sendInterest(*interest, 0);
@@ -1136,7 +1144,7 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   lp::Packet packet(interest->wireEncode());
   packet.set<lp::NonDiscoveryField>(lp::EmptyValue{});
 
@@ -1153,7 +1161,7 @@
   options.allowSelfLearning = false;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   lp::Packet packet(interest->wireEncode());
   packet.set<lp::NonDiscoveryField>(lp::EmptyValue{});
 
@@ -1172,7 +1180,7 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  shared_ptr<Data> data = makeData("/12345678");
+  auto data = makeData("/12345678");
   lp::Packet packet(data->wireEncode());
   packet.set<lp::NonDiscoveryField>(lp::EmptyValue{});
 
@@ -1188,7 +1196,8 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  lp::Nack nack = makeNack("/localhost/test", 123, lp::NackReason::NO_ROUTE);
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+                           lp::NackReason::NO_ROUTE);
   lp::Packet packet;
   packet.set<lp::FragmentField>(std::make_pair(
     nack.getInterest().wireEncode().begin(), nack.getInterest().wireEncode().end()));
@@ -1207,7 +1216,7 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  shared_ptr<Data> data = makeData("/12345678");
+  auto data = makeData("/12345678");
   auto pah = makePrefixAnnHeader("/local/ndn/prefix");
   data->setTag(make_shared<lp::PrefixAnnouncementTag>(pah));
 
@@ -1224,7 +1233,7 @@
   options.allowSelfLearning = false;
   initialize(options);
 
-  shared_ptr<Data> data = makeData("/12345678");
+  auto data = makeData("/12345678");
   auto pah = makePrefixAnnHeader("/local/ndn/prefix");
   data->setTag(make_shared<lp::PrefixAnnouncementTag>(pah));
 
@@ -1241,7 +1250,7 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  shared_ptr<Data> data = makeData("/12345678");
+  auto data = makeData("/12345678");
   lp::Packet packet(data->wireEncode());
   auto pah = makePrefixAnnHeader("/local/ndn/prefix");
   packet.set<lp::PrefixAnnouncementField>(pah);
@@ -1259,7 +1268,7 @@
   options.allowSelfLearning = false;
   initialize(options);
 
-  shared_ptr<Data> data = makeData("/12345678");
+  auto data = makeData("/12345678");
   lp::Packet packet(data->wireEncode());
   auto pah = makePrefixAnnHeader("/local/ndn/prefix");
   packet.set<lp::PrefixAnnouncementField>(pah);
@@ -1279,7 +1288,7 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  shared_ptr<Interest> interest = makeInterest("/12345678");
+  auto interest = makeInterest("/12345678");
   lp::Packet packet(interest->wireEncode());
   auto pah = makePrefixAnnHeader("/local/ndn/prefix");
   packet.set<lp::PrefixAnnouncementField>(pah);
@@ -1296,7 +1305,8 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  lp::Nack nack = makeNack("/localhost/test", 123, lp::NackReason::NO_ROUTE);
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+                           lp::NackReason::NO_ROUTE);
   lp::Packet packet;
   packet.set<lp::FragmentField>(std::make_pair(
     nack.getInterest().wireEncode().begin(), nack.getInterest().wireEncode().end()));
diff --git a/tests/daemon/face/internal-face.t.cpp b/tests/daemon/face/internal-face.t.cpp
index a830e3e..bab5ea5 100644
--- a/tests/daemon/face/internal-face.t.cpp
+++ b/tests/daemon/face/internal-face.t.cpp
@@ -102,7 +102,7 @@
 
 BOOST_AUTO_TEST_CASE(ReceiveInterestSendData)
 {
-  auto interest = makeInterest("/PQstEJGdL");
+  auto interest = makeInterest("/PQstEJGdL", true);
 
   bool hasReceivedData = false;
   clientFace->expressInterest(*interest,
@@ -125,7 +125,7 @@
 
 BOOST_AUTO_TEST_CASE(ReceiveInterestSendNack)
 {
-  auto interest = makeInterest("/1HrsRM1X", 152);
+  auto interest = makeInterest("/1HrsRM1X");
 
   bool hasReceivedNack = false;
   clientFace->expressInterest(*interest,
@@ -140,7 +140,7 @@
   BOOST_REQUIRE_EQUAL(receivedInterests.size(), 1);
   BOOST_CHECK_EQUAL(receivedInterests.back().getName(), "/1HrsRM1X");
 
-  forwarderFace->sendNack(makeNack("/1HrsRM1X", 152, lp::NackReason::NO_ROUTE), 0);
+  forwarderFace->sendNack(makeNack(*interest, lp::NackReason::NO_ROUTE), 0);
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasReceivedNack);
@@ -157,7 +157,7 @@
       clientFace->put(*makeData("/Wpc8TnEeoF/f6SzV8hD/3uytUJCuIi"));
     });
 
-  forwarderFace->sendInterest(*makeInterest("/Wpc8TnEeoF/f6SzV8hD"), 0);
+  forwarderFace->sendInterest(*makeInterest("/Wpc8TnEeoF/f6SzV8hD", true), 0);
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasDeliveredInterest);
@@ -167,16 +167,17 @@
 
 BOOST_AUTO_TEST_CASE(SendInterestReceiveNack)
 {
+  auto interest = makeInterest("/4YgJKWcXN/5oaTe05o");
+
   bool hasDeliveredInterest = false;
   clientFace->setInterestFilter("/4YgJKWcXN",
     [this, &hasDeliveredInterest] (const ndn::InterestFilter&, const Interest& interest) {
       hasDeliveredInterest = true;
       BOOST_CHECK_EQUAL(interest.getName(), "/4YgJKWcXN/5oaTe05o");
-
-      clientFace->put(makeNack("/4YgJKWcXN/5oaTe05o", 191, lp::NackReason::NO_ROUTE));
+      clientFace->put(makeNack(interest, lp::NackReason::NO_ROUTE));
     });
 
-  forwarderFace->sendInterest(*makeInterest("/4YgJKWcXN/5oaTe05o", 191), 0);
+  forwarderFace->sendInterest(*interest, 0);
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasDeliveredInterest);
diff --git a/tests/daemon/face/lp-reliability.t.cpp b/tests/daemon/face/lp-reliability.t.cpp
index a4ec6d3..5e73c03 100644
--- a/tests/daemon/face/lp-reliability.t.cpp
+++ b/tests/daemon/face/lp-reliability.t.cpp
@@ -56,6 +56,7 @@
   {
     if (frags.front().has<lp::FragmentField>()) {
       Interest interest("/test/prefix");
+      interest.setCanBePrefix(false);
       lp::Packet pkt;
       pkt.add<lp::FragmentField>(make_pair(interest.wireEncode().begin(), interest.wireEncode().end()));
       m_reliability.handleOutgoing(frags, std::move(pkt), true);
diff --git a/tests/daemon/fw/algorithm.t.cpp b/tests/daemon/fw/algorithm.t.cpp
index 96284f3..3ec11da 100644
--- a/tests/daemon/fw/algorithm.t.cpp
+++ b/tests/daemon/fw/algorithm.t.cpp
@@ -60,7 +60,7 @@
 
 BOOST_AUTO_TEST_CASE(Unrestricted)
 {
-  shared_ptr<Interest> interest = makeInterest("ndn:/ieWRzDsCu");
+  auto interest = makeInterest("ndn:/ieWRzDsCu");
 
   BOOST_CHECK_EQUAL(wouldViolateScope(*nonLocalFace1, *interest, *nonLocalFace2), false);
   BOOST_CHECK_EQUAL(wouldViolateScope(*nonLocalFace1, *interest, *localFace4), false);
@@ -70,7 +70,7 @@
 
 BOOST_AUTO_TEST_CASE(Localhost)
 {
-  shared_ptr<Interest> interest = makeInterest("ndn:/localhost/5n1LzIt3");
+  auto interest = makeInterest("ndn:/localhost/5n1LzIt3");
 
   // /localhost Interests from non-local faces should be rejected by incoming Interest pipeline,
   // and are not tested here.
@@ -80,7 +80,7 @@
 
 BOOST_AUTO_TEST_CASE(Localhop)
 {
-  shared_ptr<Interest> interest = makeInterest("ndn:/localhop/YcIKWCRYJ");
+  auto interest = makeInterest("ndn:/localhop/YcIKWCRYJ");
 
   BOOST_CHECK_EQUAL(wouldViolateScope(*nonLocalFace1, *interest, *nonLocalFace2), true);
   BOOST_CHECK_EQUAL(wouldViolateScope(*nonLocalFace1, *interest, *localFace4), false);
@@ -92,7 +92,7 @@
 
 BOOST_AUTO_TEST_CASE(CanForwardToLegacy)
 {
-  shared_ptr<Interest> interest = makeInterest("ndn:/WDsuBLIMG");
+  auto interest = makeInterest("ndn:/WDsuBLIMG");
   pit::Entry entry(*interest);
 
   auto face1 = make_shared<DummyFace>();
@@ -116,7 +116,7 @@
   auto face1 = make_shared<DummyFace>();
   auto face2 = make_shared<DummyFace>();
 
-  shared_ptr<Interest> interest = makeInterest("ndn:/qtCQ7I1c");
+  auto interest = makeInterest("ndn:/qtCQ7I1c");
   interest->setNonce(25559);
 
   pit::Entry entry0(*interest);
@@ -176,9 +176,7 @@
   auto face2 = make_shared<DummyFace>();
   auto face3 = make_shared<DummyFace>();
 
-  shared_ptr<Interest> interest = makeInterest("ndn:/totzXG0d");
-  interest->setNonce(29321);
-
+  auto interest = makeInterest("/totzXG0d", false, nullopt, 29321);
   pit::Entry entry(*interest);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
 
@@ -193,7 +191,7 @@
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
   pit::OutRecordCollection::iterator outR = entry.getOutRecord(*face2, 0);
   BOOST_REQUIRE(outR != entry.out_end());
-  lp::Nack nack = makeNack("ndn:/totzXG0d", 29321, lp::NackReason::DUPLICATE);
+  lp::Nack nack = makeNack(*interest, lp::NackReason::DUPLICATE);
   bool isNackAccepted = outR->setIncomingNack(nack); // Nack arrival
   BOOST_REQUIRE(isNackAccepted);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
@@ -210,7 +208,7 @@
   auto face1 = make_shared<DummyFace>();
   auto face2 = make_shared<DummyFace>();
 
-  shared_ptr<Interest> interest = makeInterest("ndn:/c1I7QCtc");
+  auto interest = makeInterest("ndn:/c1I7QCtc");
   pit::Entry entry(*interest);
 
   time::steady_clock::TimePoint before = time::steady_clock::now();
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 7325f24..a6d562a 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -44,10 +44,6 @@
 {
   Forwarder forwarder;
 
-  shared_ptr<Interest> interestAB = makeInterest("/A/B");
-  interestAB->setInterestLifetime(4_s);
-  shared_ptr<Data> dataABC = makeData("/A/B/C");
-
   auto face1 = make_shared<DummyFace>();
   auto face2 = make_shared<DummyFace>();
   forwarder.addFace(face1);
@@ -60,7 +56,7 @@
   BOOST_CHECK_EQUAL(forwarder.getCounters().nOutInterests, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsHits, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsMisses, 0);
-  face1->receiveInterest(*interestAB, 0);
+  face1->receiveInterest(*makeInterest("/A/B"), 0);
   this->advanceClocks(100_ms, 1_s);
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 1);
   BOOST_CHECK_EQUAL(face2->sentInterests[0].getName(), "/A/B");
@@ -73,10 +69,10 @@
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nInData, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nOutData, 0);
-  face2->receiveData(*dataABC, 0);
+  face2->receiveData(*makeData("/A/B"), 0);
   this->advanceClocks(100_ms, 1_s);
   BOOST_REQUIRE_EQUAL(face1->sentData.size(), 1);
-  BOOST_CHECK_EQUAL(face1->sentData[0].getName(), "/A/B/C");
+  BOOST_CHECK_EQUAL(face1->sentData[0].getName(), "/A/B");
   BOOST_REQUIRE(face1->sentData[0].getTag<lp::IncomingFaceIdTag>() != nullptr);
   BOOST_CHECK_EQUAL(*face1->sentData[0].getTag<lp::IncomingFaceIdTag>(), face2->getId());
   BOOST_CHECK_EQUAL(forwarder.getCounters().nInData, 1);
@@ -94,23 +90,19 @@
   forwarder.addFace(face2);
   forwarder.addFace(face3);
 
-  shared_ptr<Interest> interestA = makeInterest("/A");
-  interestA->setInterestLifetime(4_s);
-  shared_ptr<Data> dataA = makeData("/A");
-  dataA->setTag(make_shared<lp::IncomingFaceIdTag>(face3->getId()));
-
   Fib& fib = forwarder.getFib();
   fib.insert("/A").first->addOrUpdateNextHop(*face2, 0, 0);
 
   Pit& pit = forwarder.getPit();
   BOOST_CHECK_EQUAL(pit.size(), 0);
 
-  Cs& cs = forwarder.getCs();
-  cs.insert(*dataA);
+  auto data = makeData("/A/B");
+  data->setTag(make_shared<lp::IncomingFaceIdTag>(face3->getId()));
+  forwarder.getCs().insert(*data);
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsHits, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsMisses, 0);
-  face1->receiveInterest(*interestA, 0);
+  face1->receiveInterest(*makeInterest("/A", true), 0);
   this->advanceClocks(1_ms, 5_ms);
   // Interest matching ContentStore should not be forwarded
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 0);
@@ -119,6 +111,7 @@
 
   BOOST_REQUIRE_EQUAL(face1->sentData.size(), 1);
   // IncomingFaceId field should be reset to represent CS
+  BOOST_CHECK_EQUAL(face1->sentData[0].getName(), "/A/B");
   BOOST_REQUIRE(face1->sentData[0].getTag<lp::IncomingFaceIdTag>() != nullptr);
   BOOST_CHECK_EQUAL(*face1->sentData[0].getTag<lp::IncomingFaceIdTag>(), face::FACEID_CONTENT_STORE);
 
@@ -136,13 +129,11 @@
   forwarder.addFace(face2);
 
   Pit& pit = forwarder.getPit();
-  auto interestA1 = makeInterest("/A");
-  interestA1->setNonce(8378);
+  auto interestA1 = makeInterest("/A", false, nullopt, 8378);
   shared_ptr<pit::Entry> pitA = pit.insert(*interestA1).first;
   pitA->insertOrUpdateInRecord(*face1, 0, *interestA1);
 
-  auto interestA2 = makeInterest("/A");
-  interestA2->setNonce(1698);
+  auto interestA2 = makeInterest("/A", false, nullopt, 1698);
   forwarder.onOutgoingInterest(pitA, FaceEndpoint(*face2, 0), *interestA2);
 
   pit::OutRecordCollection::iterator outA2 = pitA->getOutRecord(*face2, 0);
@@ -167,7 +158,7 @@
   Fib& fib = forwarder.getFib();
   fib.insert("/A").first->addOrUpdateNextHop(*face3, 0, 0);
 
-  shared_ptr<Interest> interest = makeInterest("/A/B");
+  auto interest = makeInterest("/A/B");
   interest->setTag(make_shared<lp::NextHopFaceIdTag>(face2->getId()));
 
   face1->receiveInterest(*interest, 0);
@@ -208,49 +199,49 @@
 
   // local face, /localhost: OK
   forwarder.dispatchToStrategy_count = 0;
-  shared_ptr<Interest> i1 = makeInterest("/localhost/A1");
+  auto i1 = makeInterest("/localhost/A1");
   forwarder.onIncomingInterest(FaceEndpoint(*face1, 0), *i1);
   BOOST_CHECK_EQUAL(forwarder.dispatchToStrategy_count, 1);
 
   // non-local face, /localhost: violate
   forwarder.dispatchToStrategy_count = 0;
-  shared_ptr<Interest> i2 = makeInterest("/localhost/A2");
+  auto i2 = makeInterest("/localhost/A2");
   forwarder.onIncomingInterest(FaceEndpoint(*face2, 0), *i2);
   BOOST_CHECK_EQUAL(forwarder.dispatchToStrategy_count, 0);
 
   // local face, non-/localhost: OK
   forwarder.dispatchToStrategy_count = 0;
-  shared_ptr<Interest> i3 = makeInterest("/A3");
+  auto i3 = makeInterest("/A3");
   forwarder.onIncomingInterest(FaceEndpoint(*face1, 0), *i3);
   BOOST_CHECK_EQUAL(forwarder.dispatchToStrategy_count, 1);
 
   // non-local face, non-/localhost: OK
   forwarder.dispatchToStrategy_count = 0;
-  shared_ptr<Interest> i4 = makeInterest("/A4");
+  auto i4 = makeInterest("/A4");
   forwarder.onIncomingInterest(FaceEndpoint(*face2, 0), *i4);
   BOOST_CHECK_EQUAL(forwarder.dispatchToStrategy_count, 1);
 
   // local face, /localhost: OK
   forwarder.onDataUnsolicited_count = 0;
-  shared_ptr<Data> d1 = makeData("/localhost/B1");
+  auto d1 = makeData("/localhost/B1");
   forwarder.onIncomingData(FaceEndpoint(*face1, 0), *d1);
   BOOST_CHECK_EQUAL(forwarder.onDataUnsolicited_count, 1);
 
   // non-local face, /localhost: OK
   forwarder.onDataUnsolicited_count = 0;
-  shared_ptr<Data> d2 = makeData("/localhost/B2");
+  auto d2 = makeData("/localhost/B2");
   forwarder.onIncomingData(FaceEndpoint(*face2, 0), *d2);
   BOOST_CHECK_EQUAL(forwarder.onDataUnsolicited_count, 0);
 
   // local face, non-/localhost: OK
   forwarder.onDataUnsolicited_count = 0;
-  shared_ptr<Data> d3 = makeData("/B3");
+  auto d3 = makeData("/B3");
   forwarder.onIncomingData(FaceEndpoint(*face1, 0), *d3);
   BOOST_CHECK_EQUAL(forwarder.onDataUnsolicited_count, 1);
 
   // non-local face, non-/localhost: OK
   forwarder.onDataUnsolicited_count = 0;
-  shared_ptr<Data> d4 = makeData("/B4");
+  auto d4 = makeData("/B4");
   forwarder.onIncomingData(FaceEndpoint(*face2, 0), *d4);
   BOOST_CHECK_EQUAL(forwarder.onDataUnsolicited_count, 1);
 }
@@ -263,16 +254,16 @@
   forwarder.addFace(face1);
   forwarder.addFace(face2);
 
-  DummyStrategy& strategyA = choose<DummyStrategy>(forwarder, "ndn:/", DummyStrategy::getStrategyName());
-  DummyStrategy& strategyB = choose<DummyStrategy>(forwarder, "ndn:/B", DummyStrategy::getStrategyName());
+  DummyStrategy& strategyA = choose<DummyStrategy>(forwarder, "/", DummyStrategy::getStrategyName());
+  DummyStrategy& strategyB = choose<DummyStrategy>(forwarder, "/B", DummyStrategy::getStrategyName());
 
-  shared_ptr<Interest> interest1 = makeInterest("ndn:/A/1");
+  auto interest1 = makeInterest("/A/1");
   strategyA.afterReceiveInterest_count = 0;
   strategyA.interestOutFace = face2;
   forwarder.startProcessInterest(FaceEndpoint(*face1, 0), *interest1);
   BOOST_CHECK_EQUAL(strategyA.afterReceiveInterest_count, 1);
 
-  shared_ptr<Interest> interest2 = makeInterest("ndn:/B/2");
+  auto interest2 = makeInterest("/B/2", true);
   strategyB.afterReceiveInterest_count = 0;
   strategyB.interestOutFace = face2;
   forwarder.startProcessInterest(FaceEndpoint(*face1, 0), *interest2);
@@ -280,21 +271,19 @@
 
   this->advanceClocks(1_ms, 5_ms);
 
-  shared_ptr<Data> data1 = makeData("ndn:/A/1/a");
+  auto data1 = makeData("/A/1");
   strategyA.beforeSatisfyInterest_count = 0;
   forwarder.startProcessData(FaceEndpoint(*face2, 0), *data1);
   BOOST_CHECK_EQUAL(strategyA.beforeSatisfyInterest_count, 1);
 
-  shared_ptr<Data> data2 = makeData("ndn:/B/2/b");
+  auto data2 = makeData("/B/2/b");
   strategyB.beforeSatisfyInterest_count = 0;
   forwarder.startProcessData(FaceEndpoint(*face2, 0), *data2);
   BOOST_CHECK_EQUAL(strategyB.beforeSatisfyInterest_count, 1);
 
-  shared_ptr<Interest> interest3 = makeInterest("ndn:/A/3");
-  interest3->setInterestLifetime(30_ms);
+  auto interest3 = makeInterest("/A/3", false, 30_ms);
   forwarder.startProcessInterest(FaceEndpoint(*face1, 0), *interest3);
-  shared_ptr<Interest> interest4 = makeInterest("ndn:/B/4");
-  interest4->setInterestLifetime(5_s);
+  auto interest4 = makeInterest("/B/4", false, 5_s);
   forwarder.startProcessInterest(FaceEndpoint(*face1, 0), *interest4);
 }
 
@@ -311,19 +300,19 @@
   forwarder.addFace(face4);
 
   Pit& pit = forwarder.getPit();
-  shared_ptr<Interest> interest0 = makeInterest("ndn:/");
-  shared_ptr<pit::Entry> pit0 = pit.insert(*interest0).first;
-  pit0->insertOrUpdateInRecord(*face1, 0, *interest0);
-  shared_ptr<Interest> interestA = makeInterest("ndn:/A");
+  auto interestD = makeInterest("/A/B/C/D");
+  shared_ptr<pit::Entry> pitD = pit.insert(*interestD).first;
+  pitD->insertOrUpdateInRecord(*face1, 0, *interestD);
+  auto interestA = makeInterest("/A", true);
   shared_ptr<pit::Entry> pitA = pit.insert(*interestA).first;
-  pitA->insertOrUpdateInRecord(*face1, 0, *interestA);
   pitA->insertOrUpdateInRecord(*face2, 0, *interestA);
-  shared_ptr<Interest> interestC = makeInterest("ndn:/A/B/C");
+  pitA->insertOrUpdateInRecord(*face3, 0, *interestA);
+  auto interestC = makeInterest("/A/B/C", true);
   shared_ptr<pit::Entry> pitC = pit.insert(*interestC).first;
   pitC->insertOrUpdateInRecord(*face3, 0, *interestC);
   pitC->insertOrUpdateInRecord(*face4, 0, *interestC);
 
-  shared_ptr<Data> dataD = makeData("ndn:/A/B/C/D");
+  auto dataD = makeData("/A/B/C/D");
   forwarder.onIncomingData(FaceEndpoint(*face3, 0), *dataD);
   this->advanceClocks(1_ms, 5_ms);
 
@@ -346,27 +335,27 @@
   forwarder.addFace(face2);
   forwarder.addFace(face3);
 
-  DummyStrategy& strategyA = choose<DummyStrategy>(forwarder, "ndn:/", DummyStrategy::getStrategyName());
-  DummyStrategy& strategyB = choose<DummyStrategy>(forwarder, "ndn:/B", DummyStrategy::getStrategyName());
+  DummyStrategy& strategyA = choose<DummyStrategy>(forwarder, "/", DummyStrategy::getStrategyName());
+  DummyStrategy& strategyB = choose<DummyStrategy>(forwarder, "/B", DummyStrategy::getStrategyName());
 
   Pit& pit = forwarder.getPit();
 
   // dispatch to the correct strategy
-  shared_ptr<Interest> interest1 = makeInterest("/A/AYJqayrzF", 562);
+  auto interest1 = makeInterest("/A/AYJqayrzF", false, nullopt, 562);
   shared_ptr<pit::Entry> pit1 = pit.insert(*interest1).first;
   pit1->insertOrUpdateOutRecord(*face1, 0, *interest1);
-  shared_ptr<Interest> interest2 = makeInterest("/B/EVyP73ru", 221);
+  auto interest2 = makeInterest("/B/EVyP73ru", false, nullopt, 221);
   shared_ptr<pit::Entry> pit2 = pit.insert(*interest2).first;
   pit2->insertOrUpdateOutRecord(*face1, 0, *interest2);
 
-  lp::Nack nack1 = makeNack("/A/AYJqayrzF", 562, lp::NackReason::CONGESTION);
+  lp::Nack nack1 = makeNack(*interest1, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(FaceEndpoint(*face1, 0), nack1);
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 1);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
-  lp::Nack nack2 = makeNack("/B/EVyP73ru", 221, lp::NackReason::CONGESTION);
+  lp::Nack nack2 = makeNack(*interest2, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(FaceEndpoint(*face1, 0), nack2);
@@ -380,7 +369,7 @@
   BOOST_CHECK_EQUAL(outRecord1->getIncomingNack()->getReason(), lp::NackReason::CONGESTION);
 
   // drop if no PIT entry
-  lp::Nack nack3 = makeNack("/yEcw5HhdM", 243, lp::NackReason::CONGESTION);
+  lp::Nack nack3 = makeNack(*makeInterest("/yEcw5HhdM", false, nullopt, 243), lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(FaceEndpoint(*face1, 0), nack3);
@@ -388,11 +377,11 @@
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   // drop if no out-record
-  shared_ptr<Interest> interest4 = makeInterest("/Etab4KpY", 157);
+  auto interest4 = makeInterest("/Etab4KpY", false, nullopt, 157);
   shared_ptr<pit::Entry> pit4 = pit.insert(*interest4).first;
   pit4->insertOrUpdateOutRecord(*face1, 0, *interest4);
 
-  lp::Nack nack4a = makeNack("/Etab4KpY", 157, lp::NackReason::CONGESTION);
+  lp::Nack nack4a = makeNack(*interest4, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(FaceEndpoint(*face2, 0), nack4a);
@@ -400,7 +389,7 @@
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   // drop if Nonce does not match out-record
-  lp::Nack nack4b = makeNack("/Etab4KpY", 294, lp::NackReason::CONGESTION);
+  lp::Nack nack4b = makeNack(*makeInterest("/Etab4KpY", false, nullopt, 294), lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(FaceEndpoint(*face1, 0), nack4b);
@@ -435,7 +424,7 @@
   nackHeader.setReason(lp::NackReason::CONGESTION);
 
   // don't send Nack if there's no in-record
-  shared_ptr<Interest> interest1 = makeInterest("/fM5IVEtC", 719);
+  auto interest1 = makeInterest("/fM5IVEtC", false, nullopt, 719);
   shared_ptr<pit::Entry> pit1 = pit.insert(*interest1).first;
   pit1->insertOrUpdateInRecord(*face1, 0, *interest1);
 
@@ -444,10 +433,10 @@
   BOOST_CHECK_EQUAL(face2->sentNacks.size(), 0);
 
   // send Nack with correct Nonce
-  shared_ptr<Interest> interest2a = makeInterest("/Vi8tRm9MG3", 152);
+  auto interest2a = makeInterest("/Vi8tRm9MG3", false, nullopt, 152);
   shared_ptr<pit::Entry> pit2 = pit.insert(*interest2a).first;
   pit2->insertOrUpdateInRecord(*face1, 0, *interest2a);
-  shared_ptr<Interest> interest2b = makeInterest("/Vi8tRm9MG3", 808);
+  auto interest2b = makeInterest("/Vi8tRm9MG3", false, nullopt, 808);
   pit2->insertOrUpdateInRecord(*face2, 0, *interest2b);
 
   face1->sentNacks.clear();
@@ -472,7 +461,7 @@
   BOOST_CHECK(inRecord2b == pit2->in_end());
 
   // don't send Nack to multi-access face
-  shared_ptr<Interest> interest2c = makeInterest("/Vi8tRm9MG3", 228);
+  auto interest2c = makeInterest("/Vi8tRm9MG3", false, nullopt, 228);
   pit2->insertOrUpdateInRecord(*face3, 0, *interest2c);
 
   face3->sentNacks.clear();
@@ -500,19 +489,19 @@
 
   // receive Interest on face1
   face1->sentNacks.clear();
-  shared_ptr<Interest> interest1a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", 732);
+  auto interest1a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, nullopt, 732);
   face1->receiveInterest(*interest1a, 0);
   BOOST_CHECK(face1->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face1: legit retransmission
   face1->sentNacks.clear();
-  shared_ptr<Interest> interest1b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", 732);
+  auto interest1b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, nullopt, 732);
   face1->receiveInterest(*interest1b, 0);
   BOOST_CHECK(face1->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face2
   face2->sentNacks.clear();
-  shared_ptr<Interest> interest2a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", 732);
+  auto interest2a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, nullopt, 732);
   face2->receiveInterest(*interest2a, 0);
   BOOST_REQUIRE_EQUAL(face2->sentNacks.size(), 1);
   BOOST_CHECK_EQUAL(face2->sentNacks.back().getInterest(), *interest2a);
@@ -520,13 +509,13 @@
 
   // receive Interest with new Nonce on face2
   face2->sentNacks.clear();
-  shared_ptr<Interest> interest2b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", 944);
+  auto interest2b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, nullopt, 944);
   face2->receiveInterest(*interest2b, 0);
   BOOST_CHECK(face2->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face3, don't send Nack to multi-access face
   face3->sentNacks.clear();
-  shared_ptr<Interest> interest3a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", 732);
+  auto interest3a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, nullopt, 732);
   face3->receiveInterest(*interest3a, 0);
   BOOST_CHECK(face3->sentNacks.empty());
 }
@@ -551,9 +540,7 @@
   fib.insert("/A").first->addOrUpdateNextHop(*face2, 0, 0);
 
   // receive an Interest
-  shared_ptr<Interest> interest = makeInterest("ndn:/A/1");
-  interest->setNonce(82101183);
-  interest->setInterestLifetime(50_ms);
+  auto interest = makeInterest("/A/1", false, 50_ms, 82101183);
   face1->receiveInterest(*interest, 0);
 
   // interest should be forwarded only once, as long as Nonce is in Dead Nonce List
@@ -575,9 +562,7 @@
   shared_ptr<Face> face1 = make_shared<DummyFace>();
   forwarder.addFace(face1);
 
-  shared_ptr<Interest> interest = makeInterest("ndn:/hcLSAsQ9A");
-  interest->setNonce(61883075);
-  interest->setInterestLifetime(2_s);
+  auto interest = makeInterest("/hcLSAsQ9A", false, 2_s, 61883075);
 
   DeadNonceList& dnl = forwarder.getDeadNonceList();
   dnl.add(interest->getName(), interest->getNonce());
diff --git a/tests/daemon/fw/pit-expiry.t.cpp b/tests/daemon/fw/pit-expiry.t.cpp
index 94caac9..bd705c7 100644
--- a/tests/daemon/fw/pit-expiry.t.cpp
+++ b/tests/daemon/fw/pit-expiry.t.cpp
@@ -130,8 +130,8 @@
 
   Pit& pit = forwarder.getPit();
 
-  shared_ptr<Interest> interest1 = makeInterest("/A/0");
-  shared_ptr<Interest> interest2 = makeInterest("/A/1");
+  auto interest1 = makeInterest("/A/0");
+  auto interest2 = makeInterest("/A/1");
   interest1->setInterestLifetime(90_ms);
   interest2->setInterestLifetime(90_ms);
 
@@ -154,9 +154,9 @@
 
   Pit& pit = forwarder.getPit();
 
-  shared_ptr<Interest> interest = makeInterest("/A/0");
+  auto interest = makeInterest("/A/0");
   interest->setInterestLifetime(90_ms);
-  shared_ptr<Data> data = makeData("/A/0");
+  auto data = makeData("/A/0");
 
   face1->receiveInterest(*interest, 0);
 
@@ -180,10 +180,10 @@
   PitExpiryTestStrategy::registerAs(strategyA);
   choose<PitExpiryTestStrategy>(forwarder, "/A", strategyA);
 
-  shared_ptr<Interest> interest = makeInterest("/A/0");
+  auto interest = makeInterest("/A/0");
   interest->setInterestLifetime(90_ms);
 
-  shared_ptr<Data> data = makeData("/A/0");
+  auto data = makeData("/A/0");
   data->setTag(make_shared<lp::IncomingFaceIdTag>(face2->getId()));
 
   Pit& pit = forwarder.getPit();
@@ -221,9 +221,8 @@
 
   Pit& pit = forwarder.getPit();
 
-  shared_ptr<Interest> interest = makeInterest("/A/0", 562);
-  interest->setInterestLifetime(90_ms);
-  lp::Nack nack = makeNack("/A/0", 562, lp::NackReason::CONGESTION);
+  auto interest = makeInterest("/A/0", false, 90_ms, 562);
+  lp::Nack nack = makeNack(*interest, lp::NackReason::CONGESTION);
 
   face1->receiveInterest(*interest, 0);
   auto entry = pit.find(*interest);
@@ -253,8 +252,7 @@
 
   Pit& pit = forwarder.getPit();
 
-  shared_ptr<Interest> interest = makeInterest("/A/0");
-  interest->setInterestLifetime(90_ms);
+  auto interest = makeInterest("/A/0", false, 90_ms);
 
   face->receiveInterest(*interest, 0);
   BOOST_CHECK_EQUAL(pit.size(), 1);
@@ -285,11 +283,9 @@
   auto& sB = choose<PitExpiryTestStrategy>(forwarder, "/A/0", strategyB);
   Pit& pit = forwarder.getPit();
 
-  shared_ptr<Interest> interest1 = makeInterest("/A");
-  shared_ptr<Interest> interest2 = makeInterest("/A/0");
-  interest1->setInterestLifetime(90_ms);
-  interest2->setInterestLifetime(90_ms);
-  shared_ptr<Data> data = makeData("/A/0");
+  auto interest1 = makeInterest("/A", true, 90_ms);
+  auto interest2 = makeInterest("/A/0", false, 90_ms);
+  auto data = makeData("/A/0");
 
   face1->receiveInterest(*interest1, 0);
   face2->receiveInterest(*interest2, 0);
@@ -339,9 +335,8 @@
 
   Pit& pit = forwarder.getPit();
 
-  shared_ptr<Interest> interest = makeInterest("/A/0");
-  interest->setInterestLifetime(90_ms);
-  shared_ptr<Data> data = makeData("/A/0");
+  auto interest = makeInterest("/A/0", false, 90_ms);
+  auto data = makeData("/A/0");
 
   face1->receiveInterest(*interest, 0);
 
@@ -388,9 +383,8 @@
 
   Pit& pit = forwarder.getPit();
 
-  shared_ptr<Interest> interest = makeInterest("/A/0", 562);
-  interest->setInterestLifetime(90_ms);
-  lp::Nack nack = makeNack("/A/0", 562, lp::NackReason::CONGESTION);
+  auto interest = makeInterest("/A/0", false, 90_ms, 562);
+  lp::Nack nack = makeNack(*interest, lp::NackReason::CONGESTION);
 
   face1->receiveInterest(*interest, 0);
   auto entry = pit.find(*interest);
diff --git a/tests/daemon/fw/strategy-nack-return.t.cpp b/tests/daemon/fw/strategy-nack-return.t.cpp
index c9a66c2..2494710 100644
--- a/tests/daemon/fw/strategy-nack-return.t.cpp
+++ b/tests/daemon/fw/strategy-nack-return.t.cpp
@@ -97,14 +97,14 @@
   fibEntry.addOrUpdateNextHop(*this->face4, 0, 20);
   fibEntry.addOrUpdateNextHop(*this->face5, 0, 30);
 
-  shared_ptr<Interest> interest1 = makeInterest("/McQYjMbm", 992);
-  shared_ptr<Interest> interest2 = makeInterest("/McQYjMbm", 114);
+  auto interest1 = makeInterest("/McQYjMbm", false, nullopt, 992);
+  auto interest2 = makeInterest("/McQYjMbm", false, nullopt, 114);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest1).first;
   pitEntry->insertOrUpdateInRecord(*this->face1, 0, *interest1);
   pitEntry->insertOrUpdateInRecord(*this->face2, 0, *interest2);
   pitEntry->insertOrUpdateOutRecord(*this->face3, 0, *interest1);
 
-  lp::Nack nack3 = makeNack("/McQYjMbm", 992, lp::NackReason::CONGESTION);
+  lp::Nack nack3 = makeNack(*interest1, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*this->face3, 0)->setIncomingNack(nack3);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
@@ -132,19 +132,19 @@
   fibEntry.addOrUpdateNextHop(*this->face4, 0, 20);
   fibEntry.addOrUpdateNextHop(*this->face5, 0, 30);
 
-  shared_ptr<Interest> interest1 = makeInterest("/aS9FAyUV19", 286);
+  auto interest1 = makeInterest("/aS9FAyUV19", 286);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest1).first;
   pitEntry->insertOrUpdateInRecord(*this->face1, 0, *interest1);
   pitEntry->insertOrUpdateOutRecord(*this->face3, 0, *interest1);
   pitEntry->insertOrUpdateOutRecord(*this->face4, 0, *interest1);
 
-  lp::Nack nack3 = makeNack("/aS9FAyUV19", 286, lp::NackReason::CONGESTION);
+  lp::Nack nack3 = makeNack(*interest1, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*this->face3, 0)->setIncomingNack(nack3);
   this->strategy.afterReceiveNack(FaceEndpoint(*this->face3, 0), nack3, pitEntry);
 
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.size(), 0); // don't send Nack until all upstreams have Nacked
 
-  lp::Nack nack4 = makeNack("/aS9FAyUV19", 286, lp::NackReason::CONGESTION);
+  lp::Nack nack4 = makeNack(*interest1, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*this->face4, 0)->setIncomingNack(nack4);
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveNack(FaceEndpoint(*this->face4, 0), nack4, pitEntry); },
@@ -165,20 +165,19 @@
   fibEntry.addOrUpdateNextHop(*this->face4, 0, 20);
   fibEntry.addOrUpdateNextHop(*this->face5, 0, 30);
 
-  shared_ptr<Interest> interest1 = makeInterest("/sIYw0TXWDj", 115);
-  interest1->setInterestLifetime(400_ms);
+  auto interest1 = makeInterest("/sIYw0TXWDj", false, 400_ms, 115);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest1).first;
   pitEntry->insertOrUpdateInRecord(*this->face1, 0, *interest1);
   pitEntry->insertOrUpdateOutRecord(*this->face3, 0, *interest1);
 
   this->advanceClocks(300_ms);
-  shared_ptr<Interest> interest2 = makeInterest("/sIYw0TXWDj", 223);
+  auto interest2 = makeInterest("/sIYw0TXWDj", false, nullopt, 223);
   pitEntry->insertOrUpdateInRecord(*this->face1, 0, *interest2);
   pitEntry->insertOrUpdateOutRecord(*this->face4, 0, *interest2);
 
   this->advanceClocks(200_ms); // face3 has timed out
 
-  lp::Nack nack4 = makeNack("/sIYw0TXWDj", 223, lp::NackReason::CONGESTION);
+  lp::Nack nack4 = makeNack(*interest2, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*this->face4, 0)->setIncomingNack(nack4);
   this->strategy.afterReceiveNack(FaceEndpoint(*this->face4, 0), nack4, pitEntry);
 
@@ -255,11 +254,11 @@
   ndn::Face& appD = topo.addAppFace("D", nodeD)->getClientFace();
 
   int nNacksA = 0, nNacksD = 0;
-  appA.expressInterest(Interest("/P/1"), nullptr, bind([&nNacksA] { ++nNacksA; }), nullptr);
-  appD.expressInterest(Interest("/P/1"), nullptr, bind([&nNacksD] { ++nNacksD; }), nullptr);
+  appA.expressInterest(*makeInterest("/P/1"), nullptr, bind([&nNacksA] { ++nNacksA; }), nullptr);
+  appD.expressInterest(*makeInterest("/P/1"), nullptr, bind([&nNacksD] { ++nNacksD; }), nullptr);
   this->advanceClocks(1_ms, 5_ms);
-  appA.expressInterest(Interest("/P/1"), nullptr, bind([&nNacksA] { ++nNacksA; }), nullptr);
-  appD.expressInterest(Interest("/P/1"), nullptr, bind([&nNacksD] { ++nNacksD; }), nullptr);
+  appA.expressInterest(*makeInterest("/P/1"), nullptr, bind([&nNacksA] { ++nNacksA; }), nullptr);
+  appD.expressInterest(*makeInterest("/P/1"), nullptr, bind([&nNacksD] { ++nNacksD; }), nullptr);
   this->advanceClocks(1_ms, 100_ms);
 
   // As long as at least one Nack arrives at each client, strategy behavior is correct.
@@ -318,7 +317,7 @@
   fibEntry.addOrUpdateNextHop(*face4, 0, 20);
   fibEntry.addOrUpdateNextHop(*face5, 0, 30);
 
-  shared_ptr<Interest> interest1 = makeInterest("/F6sEwB24I", 282);
+  auto interest1 = makeInterest("/F6sEwB24I", false, nullopt, 282);
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest1).first;
   pitEntry->insertOrUpdateInRecord(*face1, 0, *interest1);
   pitEntry->insertOrUpdateOutRecord(*face3, 0, *interest1);
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 4b83e46..0214152 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.t.cpp
@@ -118,7 +118,7 @@
   fib::Entry* fibEntry = this->fib.insert("/localhost/A").first;
   fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 10);
 
-  shared_ptr<Interest> interest = makeInterest("/localhost/A/1");
+  auto interest = makeInterest("/localhost/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
 
@@ -137,7 +137,7 @@
   fib::Entry* fibEntry = this->fib.insert("/localhost/A").first;
   fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
 
-  shared_ptr<Interest> interest = makeInterest("/localhost/A/1");
+  auto interest = makeInterest("/localhost/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
 
@@ -160,7 +160,7 @@
   fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
   fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 20);
 
-  shared_ptr<Interest> interest = makeInterest("/localhost/A/1");
+  auto interest = makeInterest("/localhost/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
 
@@ -180,7 +180,7 @@
   fib::Entry* fibEntry = this->fib.insert("/localhop/A").first;
   fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
 
-  shared_ptr<Interest> interest = makeInterest("/localhop/A/1");
+  auto interest = makeInterest("/localhop/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, 0, *interest);
 
@@ -203,7 +203,7 @@
   fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
   fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 20);
 
-  shared_ptr<Interest> interest = makeInterest("/localhop/A/1");
+  auto interest = makeInterest("/localhop/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, 0, *interest);
 
@@ -224,10 +224,10 @@
   fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 10);
   fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 20);
 
-  shared_ptr<Interest> interest = makeInterest("/localhost/A/1", 1460);
+  auto interest = makeInterest("/localhost/A/1", false, nullopt, 1460);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
-  lp::Nack nack = makeNack("/localhost/A/1", 1460, lp::NackReason::NO_ROUTE);
+  lp::Nack nack = makeNack(*interest, lp::NackReason::NO_ROUTE);
   pitEntry->insertOrUpdateOutRecord(*this->localFace4, 0, *interest)->setIncomingNack(nack);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
@@ -249,10 +249,10 @@
   fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 10);
   fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 20);
 
-  shared_ptr<Interest> interest = makeInterest("/localhop/A/1", 1377);
+  auto interest = makeInterest("/localhop/A/1", 1377);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, 0, *interest);
-  lp::Nack nack = makeNack("/localhop/A/1", 1377, lp::NackReason::NO_ROUTE);
+  lp::Nack nack = makeNack(*interest, lp::NackReason::NO_ROUTE);
   pitEntry->insertOrUpdateOutRecord(*this->localFace4, 0, *interest)->setIncomingNack(nack);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
diff --git a/tests/daemon/mgmt/cs-manager.t.cpp b/tests/daemon/mgmt/cs-manager.t.cpp
index 50c82b9..3f6b3aa 100644
--- a/tests/daemon/mgmt/cs-manager.t.cpp
+++ b/tests/daemon/mgmt/cs-manager.t.cpp
@@ -209,7 +209,7 @@
   m_fwCnt.nCsHits.set(362);
   m_fwCnt.nCsMisses.set(1493);
 
-  receiveInterest(Interest("/localhost/nfd/cs/info").setCanBePrefix(true));
+  receiveInterest(*makeInterest("/localhost/nfd/cs/info", true));
   Block dataset = concatenateResponses();
   dataset.parse();
   BOOST_REQUIRE_EQUAL(dataset.elements_size(), 1);
diff --git a/tests/daemon/mgmt/manager-base.t.cpp b/tests/daemon/mgmt/manager-base.t.cpp
index 0dace4e..c253bb8 100644
--- a/tests/daemon/mgmt/manager-base.t.cpp
+++ b/tests/daemon/mgmt/manager-base.t.cpp
@@ -114,7 +114,7 @@
   m_manager.registerStatusDatasetHandler("test-status", handler);
   setTopPrefix();
 
-  receiveInterest(Interest("/localhost/nfd/test-module/test-status"));
+  receiveInterest(*makeInterest("/localhost/nfd/test-module/test-status", true));
   BOOST_CHECK(isStatusDatasetCalled);
 }
 
diff --git a/tests/daemon/mgmt/manager-common-fixture.cpp b/tests/daemon/mgmt/manager-common-fixture.cpp
index ed4344e..ebead64 100644
--- a/tests/daemon/mgmt/manager-common-fixture.cpp
+++ b/tests/daemon/mgmt/manager-common-fixture.cpp
@@ -148,7 +148,7 @@
     Name prefix = name.getPrefix(-1);
     uint64_t segmentNo = name.at(-1).toSegment() + 1;
     // request for the next segment
-    receiveInterest(Interest(prefix.appendSegment(segmentNo)));
+    receiveInterest(*makeInterest(prefix.appendSegment(segmentNo)));
   }
 
   size_t endIndex = startIndex + nResponses; // not included
diff --git a/tests/daemon/mgmt/rib-manager.t.cpp b/tests/daemon/mgmt/rib-manager.t.cpp
index dd34b5e..70369a7 100644
--- a/tests/daemon/mgmt/rib-manager.t.cpp
+++ b/tests/daemon/mgmt/rib-manager.t.cpp
@@ -445,7 +445,7 @@
     }
   }
 
-  receiveInterest(Interest("/localhost/nfd/rib/list"));
+  receiveInterest(*makeInterest("/localhost/nfd/rib/list", true));
 
   Block content = concatenateResponses();
   content.parse();
diff --git a/tests/daemon/table/pit.t.cpp b/tests/daemon/table/pit.t.cpp
index 5b051fb..d5d77e9 100644
--- a/tests/daemon/table/pit.t.cpp
+++ b/tests/daemon/table/pit.t.cpp
@@ -42,8 +42,8 @@
 
 BOOST_AUTO_TEST_CASE(Find)
 {
-  shared_ptr<Interest> interest1 = makeInterest("/6hNwxJjw");
-  shared_ptr<Interest> interest2 = makeInterest("/v65zqxm4d");
+  auto interest1 = makeInterest("/6hNwxJjw");
+  auto interest2 = makeInterest("/v65zqxm4d");
 
   NameTree nameTree(16);
   Pit pit(nameTree);
@@ -76,89 +76,89 @@
   std::pair<shared_ptr<Entry>, bool> insertResult;
 
   // base
-  shared_ptr<Interest> interestA = make_shared<Interest>(name1);
+  auto interestA = make_shared<Interest>(name1);
   insertResult = pit.insert(*interestA);
   BOOST_CHECK_EQUAL(insertResult.second, true);
   BOOST_CHECK_EQUAL(pit.size(), 1);
 
   // same as A
-  shared_ptr<Interest> interestA2 = make_shared<Interest>(*interestA);
+  auto interestA2 = make_shared<Interest>(*interestA);
   insertResult = pit.insert(*interestA2);
   BOOST_CHECK_EQUAL(insertResult.second, false); // sharing the same PIT entry
   BOOST_CHECK_EQUAL(pit.size(), 1);
 
   // A+MinSuffixComponents
-  shared_ptr<Interest> interestB = make_shared<Interest>(*interestA);
+  auto interestB = make_shared<Interest>(*interestA);
   interestB->setMinSuffixComponents(2);
   insertResult = pit.insert(*interestB);
   BOOST_CHECK_EQUAL(insertResult.second, true);
   BOOST_CHECK_EQUAL(pit.size(), 2);
 
   // A+MaxSuffixComponents
-  shared_ptr<Interest> interestC = make_shared<Interest>(*interestA);
+  auto interestC = make_shared<Interest>(*interestA);
   interestC->setMaxSuffixComponents(4);
   insertResult = pit.insert(*interestC);
   BOOST_CHECK_EQUAL(insertResult.second, true);
   BOOST_CHECK_EQUAL(pit.size(), 3);
 
   // A+KeyLocator1
-  shared_ptr<Interest> interestD = make_shared<Interest>(*interestA);
+  auto interestD = make_shared<Interest>(*interestA);
   interestD->setPublisherPublicKeyLocator(keyLocator1);
   insertResult = pit.insert(*interestD);
   BOOST_CHECK_EQUAL(insertResult.second, true);
   BOOST_CHECK_EQUAL(pit.size(), 4);
 
   // A+KeyLocator2
-  shared_ptr<Interest> interestE = make_shared<Interest>(*interestA);
+  auto interestE = make_shared<Interest>(*interestA);
   interestE->setPublisherPublicKeyLocator(keyLocator2);
   insertResult = pit.insert(*interestE);
   BOOST_CHECK_EQUAL(insertResult.second, true);
   BOOST_CHECK_EQUAL(pit.size(), 5);
 
   // A+Exclude1
-  shared_ptr<Interest> interestF = make_shared<Interest>(*interestA);
+  auto interestF = make_shared<Interest>(*interestA);
   interestF->setExclude(exclude1);
   insertResult = pit.insert(*interestF);
   BOOST_CHECK_EQUAL(insertResult.second, true);
   BOOST_CHECK_EQUAL(pit.size(), 6);
 
   // A+Exclude2
-  shared_ptr<Interest> interestG = make_shared<Interest>(*interestA);
+  auto interestG = make_shared<Interest>(*interestA);
   interestG->setExclude(exclude2);
   insertResult = pit.insert(*interestG);
   BOOST_CHECK_EQUAL(insertResult.second, true);
   BOOST_CHECK_EQUAL(pit.size(), 7);
 
   // A+ChildSelector1
-  shared_ptr<Interest> interestI = make_shared<Interest>(*interestA);
+  auto interestI = make_shared<Interest>(*interestA);
   interestI->setChildSelector(1);
   insertResult = pit.insert(*interestI);
   BOOST_CHECK_EQUAL(insertResult.second, true);
   BOOST_CHECK_EQUAL(pit.size(), 8);
 
   // A+MustBeFresh
-  shared_ptr<Interest> interestJ = make_shared<Interest>(*interestA);
+  auto interestJ = make_shared<Interest>(*interestA);
   interestJ->setMustBeFresh(true);
   insertResult = pit.insert(*interestJ);
   BOOST_CHECK_EQUAL(insertResult.second, true);
   BOOST_CHECK_EQUAL(pit.size(), 9);
 
   // A+InterestLifetime
-  shared_ptr<Interest> interestK = make_shared<Interest>(*interestA);
+  auto interestK = make_shared<Interest>(*interestA);
   interestK->setInterestLifetime(1_s);
   insertResult = pit.insert(*interestK);
   BOOST_CHECK_EQUAL(insertResult.second, false); // only guiders differ
   BOOST_CHECK_EQUAL(pit.size(), 9);
 
   // A+Nonce
-  shared_ptr<Interest> interestL = make_shared<Interest>(*interestA);
+  auto interestL = make_shared<Interest>(*interestA);
   interestL->setNonce(2192);
   insertResult = pit.insert(*interestL);
   BOOST_CHECK_EQUAL(insertResult.second, false); // only guiders differ
   BOOST_CHECK_EQUAL(pit.size(), 9);
 
   // different Name+Exclude1
-  shared_ptr<Interest> interestM = make_shared<Interest>(name2);
+  auto interestM = make_shared<Interest>(name2);
   interestM->setExclude(exclude1);
   insertResult = pit.insert(*interestM);
   BOOST_CHECK_EQUAL(insertResult.second, true);
@@ -167,7 +167,7 @@
 
 BOOST_AUTO_TEST_CASE(Erase)
 {
-  shared_ptr<Interest> interest = makeInterest("/z88Admz6A2");
+  auto interest = makeInterest("/z88Admz6A2");
 
   NameTree nameTree(16);
   Pit pit(nameTree);
@@ -202,7 +202,7 @@
   Pit pit(nameTree);
   size_t nNameTreeEntriesBefore = nameTree.size();
 
-  shared_ptr<Interest> interest = makeInterest("/37xWVvQ2K");
+  auto interest = makeInterest("/37xWVvQ2K");
   shared_ptr<Entry> entry = pit.insert(*interest).first;
   pit.erase(entry.get());
   BOOST_CHECK_EQUAL(nameTree.size(), nNameTreeEntriesBefore);
@@ -210,8 +210,8 @@
 
 BOOST_AUTO_TEST_CASE(EraseWithFullName)
 {
-  shared_ptr<Data> data = makeData("/test");
-  shared_ptr<Interest> interest = makeInterest(data->getFullName());
+  auto data = makeData("/test");
+  auto interest = makeInterest(data->getFullName());
 
   NameTree nameTree(16);
   Pit pit(nameTree);
@@ -244,9 +244,9 @@
   Name nameABCD("ndn:/A/B/C/D");
   Name nameD   ("ndn:/D");
 
-  shared_ptr<Interest> interestA   = makeInterest(nameA  );
-  shared_ptr<Interest> interestABC = makeInterest(nameABC);
-  shared_ptr<Interest> interestD   = makeInterest(nameD  );
+  auto interestA   = makeInterest(nameA,   true);
+  auto interestABC = makeInterest(nameABC, true);
+  auto interestD   = makeInterest(nameD,   true);
 
   NameTree nameTree(16);
   Pit pit(nameTree);
@@ -262,7 +262,7 @@
 
   BOOST_CHECK_EQUAL(pit.size(), 3);
 
-  shared_ptr<Data> data = makeData(nameABCD);
+  auto data = makeData(nameABCD);
 
   DataMatchResult matches = pit.findAllDataMatches(*data);
 
@@ -299,9 +299,9 @@
   NameTree nameTree(16);
   Pit pit(nameTree);
 
-  shared_ptr<Data> data = makeData("/A");
+  auto data = makeData("/A");
   Name fullName = data->getFullName();
-  shared_ptr<Interest> interest = makeInterest(fullName);
+  auto interest = makeInterest(fullName);
 
   pit.insert(*interest);
   DataMatchResult matches = pit.findAllDataMatches(*data);
@@ -354,11 +354,11 @@
   NameTree nameTree(16);
   Pit pit(nameTree);
 
-  shared_ptr<Interest> interestA    = makeInterest("/A");
-  shared_ptr<Interest> interestABC1 = makeInterest("/A/B/C");
-  shared_ptr<Interest> interestABC2 = makeInterest("/A/B/C");
+  auto interestA    = makeInterest("/A");
+  auto interestABC1 = makeInterest("/A/B/C");
+  auto interestABC2 = makeInterest("/A/B/C");
   interestABC2->setSelectors(ndn::Selectors().setMinSuffixComponents(10));
-  shared_ptr<Interest> interestD    = makeInterest("/D");
+  auto interestD    = makeInterest("/D");
 
   BOOST_CHECK_EQUAL(pit.size(), 0);
   BOOST_CHECK(pit.begin() == pit.end());
diff --git a/tests/test-common.cpp b/tests/test-common.cpp
index 534d961..9bc824a 100644
--- a/tests/test-common.cpp
+++ b/tests/test-common.cpp
@@ -31,11 +31,16 @@
 namespace tests {
 
 shared_ptr<Interest>
-makeInterest(const Name& name, uint32_t nonce)
+makeInterest(const Name& name, bool canBePrefix, optional<time::milliseconds> lifetime,
+             optional<uint32_t> nonce)
 {
   auto interest = make_shared<Interest>(name);
-  if (nonce != 0) {
-    interest->setNonce(nonce);
+  interest->setCanBePrefix(canBePrefix);
+  if (lifetime) {
+    interest->setInterestLifetime(*lifetime);
+  }
+  if (nonce) {
+    interest->setNonce(*nonce);
   }
   return interest;
 }
@@ -66,14 +71,6 @@
   return nack;
 }
 
-lp::Nack
-makeNack(const Name& name, uint32_t nonce, lp::NackReason reason)
-{
-  Interest interest(name);
-  interest.setNonce(nonce);
-  return makeNack(std::move(interest), reason);
-}
-
 ndn::PrefixAnnouncement
 makePrefixAnn(const Name& announcedName, time::milliseconds expiration,
               optional<ndn::security::ValidityPeriod> validity)
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index 63b1a99..e123b5e 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -48,12 +48,11 @@
 namespace tests {
 
 /** \brief create an Interest
- *  \param name Interest name
- *  \param nonce if non-zero, set Nonce to this value
- *               (useful for creating Nack with same Nonce)
  */
 shared_ptr<Interest>
-makeInterest(const Name& name, uint32_t nonce = 0);
+makeInterest(const Name& name, bool canBePrefix = false,
+             optional<time::milliseconds> lifetime = nullopt,
+             optional<uint32_t> nonce = nullopt);
 
 /** \brief create a Data with fake signature
  *  \note Data may be modified afterwards without losing the fake signature.
@@ -83,14 +82,6 @@
 lp::Nack
 makeNack(Interest interest, lp::NackReason reason);
 
-/** \brief create a Nack
- *  \param name Interest name
- *  \param nonce Interest nonce
- *  \param reason Nack reason
- */
-lp::Nack
-makeNack(const Name& name, uint32_t nonce, lp::NackReason reason);
-
 /** \brief replace a name component
  *  \param[inout] name name
  *  \param index name component index
