diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index 00c059f..a3b2aba 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.cpp
@@ -89,7 +89,7 @@
   // first Interest goes to nexthop with lowest FIB cost,
   // however face1 is downstream so it cannot be used
   pitEntry->insertOrUpdateInRecord(face1, *interest);
-  strategy.afterReceiveInterest(*face1, *interest, fibEntry, pitEntry);
+  strategy.afterReceiveInterest(*face1, *interest, pitEntry);
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.back().outFaceId, face2->getId());
 
@@ -101,7 +101,7 @@
   function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
   periodicalRetxFrom4 = [&] {
     pitEntry->insertOrUpdateInRecord(face4, *interest);
-    strategy.afterReceiveInterest(*face4, *interest, fibEntry, pitEntry);
+    strategy.afterReceiveInterest(*face4, *interest, pitEntry);
 
     size_t nSent = strategy.sendInterestHistory.size();
     if (nSent > nSentLast) {
@@ -133,7 +133,7 @@
   for (int i = 0; i < 3; ++i) {
     this->advanceClocks(TICK, BestRouteStrategy2::RETX_SUPPRESSION_MAX * 2);
     pitEntry->insertOrUpdateInRecord(face5, *interest);
-    strategy.afterReceiveInterest(*face5, *interest, fibEntry, pitEntry);
+    strategy.afterReceiveInterest(*face5, *interest, pitEntry);
   }
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 3);
   BOOST_CHECK_NE(strategy.sendInterestHistory[0].outFaceId, face1->getId());
@@ -209,7 +209,7 @@
 
   shared_ptr<fib::Entry> fibEntry = scenario.makeFibEntry(this);
 
-  strategy.afterReceiveInterest(*face1, *interest, fibEntry, pitEntry);
+  strategy.afterReceiveInterest(*face1, *interest, pitEntry);
 
   BOOST_REQUIRE_EQUAL(strategy.rejectPendingInterestHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory[0].pitEntry, pitEntry);
@@ -240,7 +240,7 @@
 
   lp::Nack nack3 = makeNack("/McQYjMbm", 992, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*face3)->setIncomingNack(nack3);
-  strategy.afterReceiveNack(*face3, nack3, fibEntry, pitEntry);
+  strategy.afterReceiveNack(*face3, nack3, pitEntry);
 
   BOOST_REQUIRE_EQUAL(strategy.sendNackHistory.size(), 2);
   BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].pitEntry, pitEntry);
@@ -269,13 +269,13 @@
 
   lp::Nack nack3 = makeNack("/aS9FAyUV19", 286, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*face3)->setIncomingNack(nack3);
-  strategy.afterReceiveNack(*face3, nack3, fibEntry, pitEntry);
+  strategy.afterReceiveNack(*face3, nack3, pitEntry);
 
   BOOST_CHECK_EQUAL(strategy.sendNackHistory.size(), 0); // don't send Nack until all upstreams have Nacked
 
   lp::Nack nack4 = makeNack("/aS9FAyUV19", 286, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*face4)->setIncomingNack(nack4);
-  strategy.afterReceiveNack(*face4, nack4, fibEntry, pitEntry);
+  strategy.afterReceiveNack(*face4, nack4, pitEntry);
 
   BOOST_REQUIRE_EQUAL(strategy.sendNackHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].pitEntry, pitEntry);
@@ -305,7 +305,7 @@
 
   lp::Nack nack4 = makeNack("/sIYw0TXWDj", 223, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*face4)->setIncomingNack(nack4);
-  strategy.afterReceiveNack(*face4, nack4, fibEntry, pitEntry);
+  strategy.afterReceiveNack(*face4, nack4, pitEntry);
 
   BOOST_CHECK_EQUAL(strategy.sendNackHistory.size(), 0);
 }
@@ -442,13 +442,13 @@
 
   lp::Nack nack3 = makeNack("/F6sEwB24I", 282, combination.getX());
   pitEntry->getOutRecord(*face3)->setIncomingNack(nack3);
-  strategy.afterReceiveNack(*face3, nack3, fibEntry, pitEntry);
+  strategy.afterReceiveNack(*face3, nack3, pitEntry);
 
   BOOST_CHECK_EQUAL(strategy.sendNackHistory.size(), 0);
 
   lp::Nack nack4 = makeNack("/F6sEwB24I", 282, combination.getY());
   pitEntry->getOutRecord(*face4)->setIncomingNack(nack4);
-  strategy.afterReceiveNack(*face4, nack4, fibEntry, pitEntry);
+  strategy.afterReceiveNack(*face4, nack4, pitEntry);
 
   BOOST_REQUIRE_EQUAL(strategy.sendNackHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].pitEntry, pitEntry);
diff --git a/tests/daemon/fw/client-control-strategy.t.cpp b/tests/daemon/fw/client-control-strategy.t.cpp
index e180ec9..0305b47 100644
--- a/tests/daemon/fw/client-control-strategy.t.cpp
+++ b/tests/daemon/fw/client-control-strategy.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -66,7 +66,7 @@
   pitEntry1->insertOrUpdateInRecord(face4, *interest1);
 
   strategy.sendInterestHistory.clear();
-  strategy.afterReceiveInterest(*face4, *interest1, fibEntry, pitEntry1);
+  strategy.afterReceiveInterest(*face4, *interest1, pitEntry1);
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory[0].outFaceId, face1->getId());
 
@@ -76,7 +76,7 @@
   pitEntry2->insertOrUpdateInRecord(face4, *interest2);
 
   strategy.sendInterestHistory.clear();
-  strategy.afterReceiveInterest(*face4, *interest2, fibEntry, pitEntry2);
+  strategy.afterReceiveInterest(*face4, *interest2, pitEntry2);
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory[0].outFaceId, face2->getId());
 
@@ -89,7 +89,7 @@
   face3->close(); // face3 is closed and its FaceId becomes invalid
   strategy.sendInterestHistory.clear();
   strategy.rejectPendingInterestHistory.clear();
-  strategy.afterReceiveInterest(*face4, *interest3, fibEntry, pitEntry3);
+  strategy.afterReceiveInterest(*face4, *interest3, pitEntry3);
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 0);
   BOOST_REQUIRE_EQUAL(strategy.rejectPendingInterestHistory.size(), 1);
 }
diff --git a/tests/daemon/fw/dummy-strategy.hpp b/tests/daemon/fw/dummy-strategy.hpp
index 25623cb..ca6a858 100644
--- a/tests/daemon/fw/dummy-strategy.hpp
+++ b/tests/daemon/fw/dummy-strategy.hpp
@@ -55,13 +55,11 @@
   virtual void
   afterReceiveInterest(const Face& inFace,
                        const Interest& interest,
-                       shared_ptr<fib::Entry> fibEntry,
                        shared_ptr<pit::Entry> pitEntry) override
   {
     ++afterReceiveInterest_count;
     if (wantAfterReceiveInterestCalls) {
-      afterReceiveInterestCalls.push_back(std::make_tuple(inFace.getId(), interest,
-                                                          fibEntry, pitEntry));
+      afterReceiveInterestCalls.emplace_back(inFace.getId(), interest, pitEntry);
     }
 
     if (interestOutFace) {
@@ -89,7 +87,6 @@
   virtual void
   afterReceiveNack(const Face& inFace,
                    const lp::Nack& nack,
-                   shared_ptr<fib::Entry> fibEntry,
                    shared_ptr<pit::Entry> pitEntry) override
   {
     ++afterReceiveNack_count;
@@ -98,8 +95,7 @@
 public:
   int afterReceiveInterest_count;
   bool wantAfterReceiveInterestCalls;
-  std::vector<std::tuple<FaceId, Interest, shared_ptr<fib::Entry>,
-              shared_ptr<pit::Entry>>> afterReceiveInterestCalls;
+  std::vector<std::tuple<FaceId, Interest, shared_ptr<pit::Entry>>> afterReceiveInterestCalls;
   shared_ptr<Face> interestOutFace;
 
   int beforeSatisfyInterest_count;
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index 3476cd3..5204821 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -62,7 +62,7 @@
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(face3, *interest);
 
-  strategy.afterReceiveInterest(*face3, *interest, fibEntry, pitEntry);
+  strategy.afterReceiveInterest(*face3, *interest, pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 0);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.size(), 2);
   std::set<FaceId> sentInterestFaceIds;
@@ -96,7 +96,7 @@
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(face1, *interest);
 
-  strategy.afterReceiveInterest(*face1, *interest, fibEntry, pitEntry);
+  strategy.afterReceiveInterest(*face1, *interest, pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.size(), 0);
 }
@@ -119,7 +119,7 @@
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(face1, *interest);
 
-  strategy.afterReceiveInterest(*face1, *interest, fibEntry, pitEntry);
+  strategy.afterReceiveInterest(*face1, *interest, pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.size(), 0);
 }
diff --git a/tests/daemon/fw/ncc-strategy.t.cpp b/tests/daemon/fw/ncc-strategy.t.cpp
index fa42622..9fec06b 100644
--- a/tests/daemon/fw/ncc-strategy.t.cpp
+++ b/tests/daemon/fw/ncc-strategy.t.cpp
@@ -79,7 +79,7 @@
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(interest1).first;
 
   pitEntry1->insertOrUpdateInRecord(face3, interest1);
-  strategy->afterReceiveInterest(*face3, interest1, fibEntry, pitEntry1);
+  strategy->afterReceiveInterest(*face3, interest1, pitEntry1);
 
   // forwards to face1 because routing says it's best
   // (no io run here: afterReceiveInterest has already sent the Interest)
@@ -104,7 +104,7 @@
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(interest2).first;
 
   pitEntry2->insertOrUpdateInRecord(face3, interest2);
-  strategy->afterReceiveInterest(*face3, interest2, fibEntry, pitEntry2);
+  strategy->afterReceiveInterest(*face3, interest2, pitEntry2);
 
   // forwards to face2 because it responds previously
   this->advanceClocks(time::milliseconds(1));
@@ -141,7 +141,7 @@
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
 
   pitEntry1->insertOrUpdateInRecord(face3, *interest1);
-  strategy->afterReceiveInterest(*face3, *interest1, fibEntry, pitEntry1);
+  strategy->afterReceiveInterest(*face3, *interest1, pitEntry1);
 
   this->advanceClocks(time::milliseconds(1));
   BOOST_REQUIRE_EQUAL(strategy->sendInterestHistory.size(), 1);
@@ -159,7 +159,7 @@
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(*interest2).first;
 
   pitEntry2->insertOrUpdateInRecord(face3, *interest2);
-  strategy->afterReceiveInterest(*face3, *interest2, fibEntry, pitEntry2);
+  strategy->afterReceiveInterest(*face3, *interest2, pitEntry2);
 
   // FIB entry is changed before doPropagate executes
   fibEntry->addNextHop(face2, 20);
@@ -198,7 +198,7 @@
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
 
   pitEntry1->insertOrUpdateInRecord(face3, *interest1);
-  strategy->afterReceiveInterest(*face3, *interest1, fibEntry, pitEntry1);
+  strategy->afterReceiveInterest(*face3, *interest1, pitEntry1);
   limitedIo.run(2 - strategy->sendInterestHistory.size(),
                 time::milliseconds(2000), time::milliseconds(10));
   BOOST_REQUIRE_EQUAL(strategy->sendInterestHistory.size(), 2);
@@ -220,7 +220,7 @@
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(*interest2).first;
 
   pitEntry2->insertOrUpdateInRecord(face3, *interest2);
-  strategy->afterReceiveInterest(*face3, *interest2, fibEntry, pitEntry2);
+  strategy->afterReceiveInterest(*face3, *interest2, pitEntry2);
   limitedIo.run(3 - strategy->sendInterestHistory.size(),
                 time::milliseconds(2000), time::milliseconds(10));
 
@@ -257,7 +257,7 @@
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
 
   pitEntry1->insertOrUpdateInRecord(face1, *interest1);
-  strategy->afterReceiveInterest(*face1, *interest1, fibEntry, pitEntry1);
+  strategy->afterReceiveInterest(*face1, *interest1, pitEntry1);
   limitedIo.run(1 - strategy->sendInterestHistory.size(),
                 time::milliseconds(2000), time::milliseconds(10));
   BOOST_REQUIRE_EQUAL(strategy->sendInterestHistory.size(), 1);
@@ -273,7 +273,7 @@
 
   // similar Interest: strategy should still forward it
   pitEntry1->insertOrUpdateInRecord(face1, *interest1);
-  strategy->afterReceiveInterest(*face1, *interest1, fibEntry, pitEntry1);
+  strategy->afterReceiveInterest(*face1, *interest1, pitEntry1);
   limitedIo.run(2 - strategy->sendInterestHistory.size(),
                 time::milliseconds(2000), time::milliseconds(10));
   BOOST_REQUIRE_EQUAL(strategy->sendInterestHistory.size(), 2);
@@ -307,7 +307,7 @@
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
   pitEntry1->insertOrUpdateInRecord(face1, *interest1);
 
-  strategy->afterReceiveInterest(*face1, *interest1, fibEntry, pitEntry1);
+  strategy->afterReceiveInterest(*face1, *interest1, pitEntry1);
 
   // Interest shall go to face2, not loop back to face1
   BOOST_REQUIRE_EQUAL(strategy->sendInterestHistory.size(), 1);
