diff --git a/tests/daemon/face/dummy-link-service.cpp b/tests/daemon/face/dummy-link-service.cpp
index ce006cb..820d05b 100644
--- a/tests/daemon/face/dummy-link-service.cpp
+++ b/tests/daemon/face/dummy-link-service.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,7 +30,7 @@
 namespace tests {
 
 void
-DummyLinkService::doSendInterest(const Interest& interest, const EndpointId&)
+DummyLinkService::doSendInterest(const Interest& interest)
 {
   if (m_loggingFlags & LogSentInterests)
     sentInterests.push_back(interest);
@@ -39,7 +39,7 @@
 }
 
 void
-DummyLinkService::doSendData(const Data& data, const EndpointId&)
+DummyLinkService::doSendData(const Data& data)
 {
   if (m_loggingFlags & LogSentData)
     sentData.push_back(data);
@@ -48,7 +48,7 @@
 }
 
 void
-DummyLinkService::doSendNack(const lp::Nack& nack, const EndpointId&)
+DummyLinkService::doSendNack(const lp::Nack& nack)
 {
   if (m_loggingFlags & LogSentNacks)
     sentNacks.push_back(nack);
diff --git a/tests/daemon/face/dummy-link-service.hpp b/tests/daemon/face/dummy-link-service.hpp
index 44ed991..3d77968 100644
--- a/tests/daemon/face/dummy-link-service.hpp
+++ b/tests/daemon/face/dummy-link-service.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -73,13 +73,13 @@
 
 private:
   void
-  doSendInterest(const Interest& interest, const EndpointId& endpoint) final;
+  doSendInterest(const Interest& interest) final;
 
   void
-  doSendData(const Data& data, const EndpointId& endpoint) final;
+  doSendData(const Data& data) final;
 
   void
-  doSendNack(const lp::Nack& nack, const EndpointId& endpoint) final;
+  doSendNack(const lp::Nack& nack) final;
 
   void
   doReceivePacket(const Block& packet, const EndpointId& endpoint) final;
diff --git a/tests/daemon/face/face.t.cpp b/tests/daemon/face/face.t.cpp
index 346f609..b592a24 100644
--- a/tests/daemon/face/face.t.cpp
+++ b/tests/daemon/face/face.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -119,16 +119,16 @@
   }
 
   for (size_t i = 0; i < nOutInterests; ++i) {
-    face1->sendInterest(*makeInterest("/XyUAFYQDmd"), 0);
+    face1->sendInterest(*makeInterest("/XyUAFYQDmd"));
   }
 
   for (size_t i = 0; i < nOutData; ++i) {
-    face1->sendData(*makeData("/GigPEtPH6"), 0);
+    face1->sendData(*makeData("/GigPEtPH6"));
   }
 
   for (size_t i = 0; i < nOutNacks; ++i) {
     face1->sendNack(makeNack(*makeInterest("/9xK6FbwIBM", false, nullopt, 365),
-                             lp::NackReason::CONGESTION), 0);
+                             lp::NackReason::CONGESTION));
   }
 
   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 130c85e..b78ada6 100644
--- a/tests/daemon/face/generic-link-service.t.cpp
+++ b/tests/daemon/face/generic-link-service.t.cpp
@@ -106,7 +106,7 @@
   initialize(options);
 
   auto interest1 = makeInterest("/localhost/test");
-  face->sendInterest(*interest1, 0);
+  face->sendInterest(*interest1);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutInterests, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -123,7 +123,7 @@
   initialize(options);
 
   auto data1 = makeData("/localhost/test");
-  face->sendData(*data1, 0);
+  face->sendData(*data1);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutData, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -167,7 +167,7 @@
   // Send Data with less than MIN_MTU octets
   auto data1 = makeData("/localhost");
   BOOST_CHECK_LE(data1->wireEncode().size(), MIN_MTU);
-  face->sendData(*data1, 0);
+  face->sendData(*data1);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutData, 1);
   BOOST_CHECK_EQUAL(service->getCounters().nOutOverMtu, 0);
@@ -175,7 +175,7 @@
   // Send Data with more than MIN_MTU octets
   auto data2 = makeData("/localhost/test/1234567890/1234567890/1234567890/1234567890");
   BOOST_CHECK_GT(data2->wireEncode().size(), MIN_MTU);
-  face->sendData(*data2, 0);
+  face->sendData(*data2);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutData, 2);
   BOOST_CHECK_EQUAL(service->getCounters().nOutOverMtu, 1);
@@ -196,7 +196,7 @@
 
   auto nack1 = makeNack(*makeInterest("/localhost/test", false, nullopt, 323),
                         lp::NackReason::NO_ROUTE);
-  face->sendNack(nack1, 0);
+  face->sendNack(nack1);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutNacks, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -331,7 +331,7 @@
   transport->setMtu(55);
 
   auto data = makeData("/test/data/123456789/987654321/123456789");
-  face->sendData(*data, 0);
+  face->sendData(*data);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 0);
   BOOST_CHECK_EQUAL(service->getCounters().nOutOverMtu, 1);
@@ -349,7 +349,7 @@
   transport->setMtu(0);
 
   auto data = makeData("/test/data/123456789/987654321/123456789");
-  face->sendData(*data, 0);
+  face->sendData(*data);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 0);
   BOOST_CHECK_EQUAL(service->getCounters().nOutOverMtu, 1);
@@ -365,7 +365,7 @@
   transport->setMtu(MTU_UNLIMITED);
 
   auto data = makeData("/test/data/123456789/987654321/123456789");
-  face->sendData(*data, 0);
+  face->sendData(*data);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 1);
 }
@@ -380,7 +380,7 @@
   transport->setMtu(105);
 
   auto data = makeData("/test/data/123456789/987654321/123456789");
-  face->sendData(*data, 0);
+  face->sendData(*data);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 1);
 }
@@ -395,7 +395,7 @@
   transport->setMtu(60);
 
   auto data = makeData("/test/data/123456789/987654321/123456789");
-  face->sendData(*data, 0);
+  face->sendData(*data);
 
   BOOST_CHECK_GT(transport->sentPackets.size(), 1);
 }
@@ -412,7 +412,7 @@
   transport->setMtu(0);
 
   auto data = makeData("/test/data/123456789/987654321/123456789");
-  face->sendData(*data, 0);
+  face->sendData(*data);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 0);
   BOOST_CHECK_EQUAL(service->getCounters().nFragmentationErrors, 1);
@@ -504,7 +504,7 @@
   initialize(options);
 
   auto interest1 = makeInterest("/localhost/test");
-  face->sendInterest(*interest1, 0);
+  face->sendInterest(*interest1);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutInterests, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -522,7 +522,7 @@
   initialize(options);
 
   auto data1 = makeData("/localhost/test");
-  face->sendData(*data1, 0);
+  face->sendData(*data1);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutData, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -541,7 +541,7 @@
 
   auto nack1 = makeNack(*makeInterest("/localhost/test", false, nullopt, 323),
                         lp::NackReason::NO_ROUTE);
-  face->sendNack(nack1, 0);
+  face->sendNack(nack1);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutNacks, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -599,7 +599,7 @@
 
   // no congestion
   transport->setSendQueueLength(0);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet pkt1(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt1.count<lp::CongestionMarkField>(), 0);
@@ -609,7 +609,7 @@
 
   // no congestion
   transport->setSendQueueLength(32768);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 2);
   lp::Packet pkt2(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt2.count<lp::CongestionMarkField>(), 0);
@@ -632,7 +632,7 @@
 
   // first congested packet, will not be marked
   transport->setSendQueueLength(65537);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet pkt0(transport->sentPackets.back().packet);
   BOOST_REQUIRE_EQUAL(pkt0.count<lp::CongestionMarkField>(), 0);
@@ -644,7 +644,7 @@
                                             std::sqrt(service->m_nMarkedSinceInMarkingState + 1)));
 
   advanceClocks(markingInterval + 1_ms);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   lp::Packet pkt1(transport->sentPackets.back().packet);
 
   // First congestion mark appears after one interval (100 ms)
@@ -658,7 +658,7 @@
 
   // second congested packet, but within marking interval, will not be marked
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 3);
   lp::Packet pkt2(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt2.count<lp::CongestionMarkField>(), 0);
@@ -677,7 +677,7 @@
 
   // first congested packet after waiting marking interval, will be marked
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 4);
   lp::Packet pkt3(transport->sentPackets.back().packet);
   BOOST_REQUIRE_EQUAL(pkt3.count<lp::CongestionMarkField>(), 1);
@@ -695,7 +695,7 @@
 
   // still congested, but within marking interval cycle
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 5);
   lp::Packet pkt4(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt4.count<lp::CongestionMarkField>(), 0);
@@ -708,7 +708,7 @@
 
   // still congested, after marking interval cycle
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 6);
   lp::Packet pkt5(transport->sentPackets.back().packet);
   BOOST_REQUIRE_EQUAL(pkt5.count<lp::CongestionMarkField>(), 1);
@@ -725,7 +725,7 @@
 
   // still congested, but within marking interval cycle
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 7);
   lp::Packet pkt6(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt6.count<lp::CongestionMarkField>(), 0);
@@ -737,7 +737,7 @@
 
   // still congested, after marking interval cycle
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 8);
   lp::Packet pkt7(transport->sentPackets.back().packet);
   BOOST_REQUIRE_EQUAL(pkt7.count<lp::CongestionMarkField>(), 1);
@@ -752,7 +752,7 @@
 
   // no more congestion
   transport->setSendQueueLength(30000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 9);
   lp::Packet pkt8(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt8.count<lp::CongestionMarkField>(), 0);
@@ -764,7 +764,7 @@
 
   // send queue congested again, but can't mark packet because within one full interval of last mark
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 10);
   lp::Packet pkt9(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt9.count<lp::CongestionMarkField>(), 0);
@@ -782,7 +782,7 @@
   BOOST_CHECK_GT(time::steady_clock::now(), nextMarkTime);
 
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 11);
   lp::Packet pkt10(transport->sentPackets.back().packet);
   BOOST_REQUIRE_EQUAL(pkt10.count<lp::CongestionMarkField>(), 1);
@@ -800,7 +800,7 @@
 
   // not marked since within 100ms window before can mark again
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 12);
   lp::Packet pkt11(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt11.count<lp::CongestionMarkField>(), 0);
@@ -813,7 +813,7 @@
 
   // markable packet, queue length still above threshold
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 13);
   lp::Packet pkt12(transport->sentPackets.back().packet);
   BOOST_REQUIRE_EQUAL(pkt12.count<lp::CongestionMarkField>(), 1);
@@ -828,7 +828,7 @@
 
   // no more congestion
   transport->setSendQueueLength(10000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 14);
   lp::Packet pkt13(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt13.count<lp::CongestionMarkField>(), 0);
@@ -841,7 +841,7 @@
 
   // start congestion again
   transport->setSendQueueLength(66000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 15);
   lp::Packet pkt14(transport->sentPackets.back().packet);
   BOOST_REQUIRE_EQUAL(pkt14.count<lp::CongestionMarkField>(), 0);
@@ -852,7 +852,7 @@
 
   // no more congestion, cancel marking interval
   transport->setSendQueueLength(5000);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 16);
   lp::Packet pkt15(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt15.count<lp::CongestionMarkField>(), 0);
@@ -878,7 +878,7 @@
 
   // no congestion
   transport->setSendQueueLength(0);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet pkt1(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt1.count<lp::CongestionMarkField>(), 0);
@@ -888,7 +888,7 @@
 
   // no congestion
   transport->setSendQueueLength(65536);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 2);
   lp::Packet pkt2(transport->sentPackets.back().packet);
   BOOST_CHECK_EQUAL(pkt2.count<lp::CongestionMarkField>(), 0);
@@ -898,7 +898,7 @@
 
   // first congested (not marked yet) packet
   transport->setSendQueueLength(65537);
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 3);
   lp::Packet pkt3(transport->sentPackets.back().packet);
   BOOST_REQUIRE_EQUAL(pkt3.count<lp::CongestionMarkField>(), 0);
@@ -1056,7 +1056,7 @@
   auto interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::IncomingFaceIdTag>(1000));
 
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1074,7 +1074,7 @@
   auto interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::IncomingFaceIdTag>(1000));
 
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1142,7 +1142,7 @@
   auto interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::CongestionMarkTag>(1));
 
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1155,7 +1155,7 @@
   auto data = makeData("/12345678");
   data->setTag(make_shared<lp::CongestionMarkTag>(0));
 
-  face->sendData(*data, 0);
+  face->sendData(*data);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1169,7 +1169,7 @@
                            lp::NackReason::NO_ROUTE);
   nack.setTag(make_shared<lp::CongestionMarkTag>(std::numeric_limits<uint64_t>::max()));
 
-  face->sendNack(nack, 0);
+  face->sendNack(nack);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1232,7 +1232,7 @@
   auto interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::NonDiscoveryTag>(lp::EmptyValue{}));
 
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1248,7 +1248,7 @@
   auto interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::NonDiscoveryTag>(lp::EmptyValue{}));
 
-  face->sendInterest(*interest, 0);
+  face->sendInterest(*interest);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1336,7 +1336,7 @@
   auto pah = makePrefixAnnHeader("/local/ndn/prefix");
   data->setTag(make_shared<lp::PrefixAnnouncementTag>(pah));
 
-  face->sendData(*data, 0);
+  face->sendData(*data);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1353,7 +1353,7 @@
   auto pah = makePrefixAnnHeader("/local/ndn/prefix");
   data->setTag(make_shared<lp::PrefixAnnouncementTag>(pah));
 
-  face->sendData(*data, 0);
+  face->sendData(*data);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
diff --git a/tests/daemon/face/internal-face.t.cpp b/tests/daemon/face/internal-face.t.cpp
index bab5ea5..db72bcc 100644
--- a/tests/daemon/face/internal-face.t.cpp
+++ b/tests/daemon/face/internal-face.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -117,7 +117,7 @@
   BOOST_REQUIRE_EQUAL(receivedInterests.size(), 1);
   BOOST_CHECK_EQUAL(receivedInterests.back().getName(), "/PQstEJGdL");
 
-  forwarderFace->sendData(*makeData("/PQstEJGdL/aI7oCrDXNX"), 0);
+  forwarderFace->sendData(*makeData("/PQstEJGdL/aI7oCrDXNX"));
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasReceivedData);
@@ -140,7 +140,7 @@
   BOOST_REQUIRE_EQUAL(receivedInterests.size(), 1);
   BOOST_CHECK_EQUAL(receivedInterests.back().getName(), "/1HrsRM1X");
 
-  forwarderFace->sendNack(makeNack(*interest, lp::NackReason::NO_ROUTE), 0);
+  forwarderFace->sendNack(makeNack(*interest, lp::NackReason::NO_ROUTE));
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasReceivedNack);
@@ -157,7 +157,7 @@
       clientFace->put(*makeData("/Wpc8TnEeoF/f6SzV8hD/3uytUJCuIi"));
     });
 
-  forwarderFace->sendInterest(*makeInterest("/Wpc8TnEeoF/f6SzV8hD", true), 0);
+  forwarderFace->sendInterest(*makeInterest("/Wpc8TnEeoF/f6SzV8hD", true));
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasDeliveredInterest);
@@ -177,7 +177,7 @@
       clientFace->put(makeNack(interest, lp::NackReason::NO_ROUTE));
     });
 
-  forwarderFace->sendInterest(*interest, 0);
+  forwarderFace->sendInterest(*interest);
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasDeliveredInterest);
@@ -211,7 +211,7 @@
   g_io.poll(); // #3248 workaround
   clientFace.reset();
 
-  forwarderFace->sendInterest(*makeInterest("/aau42XQqb"), 0);
+  forwarderFace->sendInterest(*makeInterest("/aau42XQqb"));
   BOOST_CHECK_NO_THROW(this->advanceClocks(1_ms, 10));
 }
 
diff --git a/tests/daemon/face/lp-reliability.t.cpp b/tests/daemon/face/lp-reliability.t.cpp
index 525ab97..b45ae98 100644
--- a/tests/daemon/face/lp-reliability.t.cpp
+++ b/tests/daemon/face/lp-reliability.t.cpp
@@ -62,25 +62,25 @@
     }
 
     for (auto frag : frags) {
-      this->sendLpPacket(std::move(frag), 0);
+      this->sendLpPacket(std::move(frag));
     }
   }
 
 private:
   void
-  doSendInterest(const Interest&, const EndpointId&) final
+  doSendInterest(const Interest&) final
   {
     BOOST_FAIL("unexpected doSendInterest");
   }
 
   void
-  doSendData(const Data&, const EndpointId&) final
+  doSendData(const Data&) final
   {
     BOOST_FAIL("unexpected doSendData");
   }
 
   void
-  doSendNack(const lp::Nack&, const EndpointId&) final
+  doSendNack(const lp::Nack&) final
   {
     BOOST_FAIL("unexpected doSendNack");
   }
diff --git a/tests/daemon/face/null-face.t.cpp b/tests/daemon/face/null-face.t.cpp
index de343e0..4a5f539 100644
--- a/tests/daemon/face/null-face.t.cpp
+++ b/tests/daemon/face/null-face.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -74,10 +74,10 @@
   auto face = makeNullFace();
   BOOST_CHECK_EQUAL(face->getState(), FaceState::UP);
 
-  face->sendInterest(*makeInterest("/A"), 0);
+  face->sendInterest(*makeInterest("/A"));
   BOOST_CHECK_EQUAL(face->getState(), FaceState::UP);
 
-  face->sendData(*makeData("/B"), 0);
+  face->sendData(*makeData("/B"));
   BOOST_CHECK_EQUAL(face->getState(), FaceState::UP);
 }
 
diff --git a/tests/daemon/fw/topology-tester.cpp b/tests/daemon/fw/topology-tester.cpp
index 92495d4..73f9999 100644
--- a/tests/daemon/fw/topology-tester.cpp
+++ b/tests/daemon/fw/topology-tester.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -169,27 +169,27 @@
   ///\todo #3941 call GenericLinkServiceCounters constructor in TopologyPcapLinkService constructor
 
   void
-  doSendInterest(const Interest& interest, const EndpointId& endpointId) override
+  doSendInterest(const Interest& interest) override
   {
     this->sentInterests.push_back(interest);
     this->sentInterests.back().setTag(std::make_shared<TopologyPcapTimestamp>(time::steady_clock::now()));
-    this->GenericLinkService::doSendInterest(interest, endpointId);
+    this->GenericLinkService::doSendInterest(interest);
   }
 
   void
-  doSendData(const Data& data, const EndpointId& endpointId) override
+  doSendData(const Data& data) override
   {
     this->sentData.push_back(data);
     this->sentData.back().setTag(std::make_shared<TopologyPcapTimestamp>(time::steady_clock::now()));
-    this->GenericLinkService::doSendData(data, endpointId);
+    this->GenericLinkService::doSendData(data);
   }
 
   void
-  doSendNack(const lp::Nack& nack, const EndpointId& endpointId) override
+  doSendNack(const lp::Nack& nack) override
   {
     this->sentNacks.push_back(nack);
     this->sentNacks.back().setTag(std::make_shared<TopologyPcapTimestamp>(time::steady_clock::now()));
-    this->GenericLinkService::doSendNack(nack, endpointId);
+    this->GenericLinkService::doSendNack(nack);
   }
 };
 
diff --git a/tests/daemon/mgmt/face-manager-update-face.t.cpp b/tests/daemon/mgmt/face-manager-update-face.t.cpp
index c2f0131..b380419 100644
--- a/tests/daemon/mgmt/face-manager-update-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-update-face.t.cpp
@@ -110,7 +110,7 @@
         if (isForOnDemandFace) {
           auto face = target.faceTable.get(static_cast<FaceId>(this->faceId));
           // to force creation of on-demand face
-          face->sendInterest(*make_shared<Interest>("/hello/world"), 0);
+          face->sendInterest(*make_shared<Interest>("/hello/world"));
         }
       });
 
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index 5c7703f..3bf5a14 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -149,13 +149,13 @@
   tieFaces(const shared_ptr<Face>& face1, const shared_ptr<Face>& face2)
   {
     face1->afterReceiveInterest.connect([face2] (const Interest& interest, const EndpointId&) {
-      face2->sendInterest(interest, 0);
+      face2->sendInterest(interest);
     });
     face1->afterReceiveData.connect([face2] (const Data& data, const EndpointId&) {
-      face2->sendData(data, 0);
+      face2->sendData(data);
     });
     face1->afterReceiveNack.connect([face2] (const ndn::lp::Nack& nack, const EndpointId&) {
-      face2->sendNack(nack, 0);
+      face2->sendNack(nack);
     });
   }
 
