diff --git a/tests/daemon/fw/asf-strategy.t.cpp b/tests/daemon/fw/asf-strategy.t.cpp
index 78eb795..afe009f 100644
--- a/tests/daemon/fw/asf-strategy.t.cpp
+++ b/tests/daemon/fw/asf-strategy.t.cpp
@@ -275,7 +275,7 @@
   auto& pit = topo.getForwarder(nodeB).getPit();
   auto pitEntry = pit.insert(*interest).first;
 
-  topo.getForwarder(nodeB).onOutgoingInterest(pitEntry, linkBC->getFace(nodeB), *interest);
+  topo.getForwarder(nodeB).onOutgoingInterest(*interest, linkBC->getFace(nodeB), pitEntry);
   this->advanceClocks(time::milliseconds(100));
 
   interest->refreshNonce();
diff --git a/tests/daemon/fw/best-route-strategy.t.cpp b/tests/daemon/fw/best-route-strategy.t.cpp
index cd519b5..5066cca 100644
--- a/tests/daemon/fw/best-route-strategy.t.cpp
+++ b/tests/daemon/fw/best-route-strategy.t.cpp
@@ -88,7 +88,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(FaceEndpoint(*face1, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face1, 0), pitEntry);
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.back().outFaceId, face2->getId());
 
@@ -100,7 +100,7 @@
   std::function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
   periodicalRetxFrom4 = [&] {
     pitEntry->insertOrUpdateInRecord(*face4, *interest);
-    strategy.afterReceiveInterest(FaceEndpoint(*face4, 0), *interest, pitEntry);
+    strategy.afterReceiveInterest(*interest, FaceEndpoint(*face4, 0), pitEntry);
 
     size_t nSent = strategy.sendInterestHistory.size();
     if (nSent > nSentLast) {
@@ -132,7 +132,7 @@
   for (int i = 0; i < 3; ++i) {
     this->advanceClocks(TICK, BestRouteStrategy::RETX_SUPPRESSION_MAX * 2);
     pitEntry->insertOrUpdateInRecord(*face5, *interest);
-    strategy.afterReceiveInterest(FaceEndpoint(*face5, 0), *interest, pitEntry);
+    strategy.afterReceiveInterest(*interest, FaceEndpoint(*face5, 0), pitEntry);
   }
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 3);
   BOOST_CHECK_NE(strategy.sendInterestHistory[0].outFaceId, face1->getId());
diff --git a/tests/daemon/fw/dummy-strategy.cpp b/tests/daemon/fw/dummy-strategy.cpp
index 3a6e338..439efd1 100644
--- a/tests/daemon/fw/dummy-strategy.cpp
+++ b/tests/daemon/fw/dummy-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -44,23 +44,18 @@
 
 DummyStrategy::DummyStrategy(Forwarder& forwarder, const Name& name)
   : Strategy(forwarder)
-  , afterReceiveInterest_count(0)
-  , beforeSatisfyInterest_count(0)
-  , afterContentStoreHit_count(0)
-  , afterReceiveData_count(0)
-  , afterReceiveNack_count(0)
 {
   this->setInstanceName(name);
 }
 
 void
-DummyStrategy::afterReceiveInterest(const FaceEndpoint& ingress, const Interest& interest,
+DummyStrategy::afterReceiveInterest(const Interest& interest, const FaceEndpoint&,
                                     const shared_ptr<pit::Entry>& pitEntry)
 {
   ++afterReceiveInterest_count;
 
   if (interestOutFace != nullptr) {
-    this->sendInterest(pitEntry, *interestOutFace, interest);
+    this->sendInterest(interest, *interestOutFace, pitEntry);
   }
   else {
     this->rejectPendingInterest(pitEntry);
@@ -68,39 +63,39 @@
 }
 
 void
-DummyStrategy::beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
-                                     const FaceEndpoint& ingress, const Data& data)
-{
-  ++beforeSatisfyInterest_count;
-
-  Strategy::beforeSatisfyInterest(pitEntry, ingress, data);
-}
-
-void
-DummyStrategy::afterContentStoreHit(const shared_ptr<pit::Entry>& pitEntry,
-                                    const FaceEndpoint& ingress, const Data& data)
+DummyStrategy::afterContentStoreHit(const Data& data, const FaceEndpoint& ingress,
+                                    const shared_ptr<pit::Entry>& pitEntry)
 {
   ++afterContentStoreHit_count;
 
-  Strategy::afterContentStoreHit(pitEntry, ingress, data);
+  Strategy::afterContentStoreHit(data, ingress, pitEntry);
 }
 
 void
-DummyStrategy::afterReceiveData(const shared_ptr<pit::Entry>& pitEntry,
-                                const FaceEndpoint& ingress, const Data& data)
+DummyStrategy::beforeSatisfyInterest(const Data& data, const FaceEndpoint& ingress,
+                                     const shared_ptr<pit::Entry>& pitEntry)
+{
+  ++beforeSatisfyInterest_count;
+
+  Strategy::beforeSatisfyInterest(data, ingress, pitEntry);
+}
+
+void
+DummyStrategy::afterReceiveData(const Data& data, const FaceEndpoint& ingress,
+                                const shared_ptr<pit::Entry>& pitEntry)
 {
   ++afterReceiveData_count;
 
-  Strategy::afterReceiveData(pitEntry, ingress, data);
+  Strategy::afterReceiveData(data, ingress, pitEntry);
 }
 
 void
-DummyStrategy::afterReceiveNack(const FaceEndpoint& ingress, const lp::Nack& nack,
+DummyStrategy::afterReceiveNack(const lp::Nack& nack, const FaceEndpoint& ingress,
                                 const shared_ptr<pit::Entry>& pitEntry)
 {
   ++afterReceiveNack_count;
 
-  Strategy::afterReceiveNack(ingress, nack, pitEntry);
+  Strategy::afterReceiveNack(nack, ingress, pitEntry);
 }
 
 void
diff --git a/tests/daemon/fw/dummy-strategy.hpp b/tests/daemon/fw/dummy-strategy.hpp
index aacc1e4..f24d990 100644
--- a/tests/daemon/fw/dummy-strategy.hpp
+++ b/tests/daemon/fw/dummy-strategy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -47,37 +47,39 @@
   static Name
   getStrategyName(uint64_t version = std::numeric_limits<uint64_t>::max());
 
-  /** \brief constructor
+  /**
+   * \brief Constructor
    *
-   *  \p name is recorded unchanged as \p getInstanceName() , and will not automatically
-   *  gain a version number when instantiated without a version number.
+   * \p name is recorded unchanged as getInstanceName(), and will not automatically
+   * gain a version number when instantiated without a version number.
    */
   explicit
   DummyStrategy(Forwarder& forwarder, const Name& name = getStrategyName());
 
-  /** \brief after receive Interest trigger
+  /**
+   * \brief After receive Interest trigger
    *
-   *  If \p interestOutFace is not null, Interest is forwarded to that face and endpoint via send Interest action;
-   *  otherwise, reject pending Interest action is invoked.
+   * If interestOutFace is not null, \p interest is forwarded to that face;
+   * otherwise, rejectPendingInterest() is invoked.
    */
   void
-  afterReceiveInterest(const FaceEndpoint& ingress, const Interest& interest,
+  afterReceiveInterest(const Interest& interest, const FaceEndpoint& ingress,
                        const shared_ptr<pit::Entry>& pitEntry) override;
 
   void
-  beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
-                        const FaceEndpoint& ingress, const Data& data) override;
+  afterContentStoreHit(const Data& data, const FaceEndpoint& ingress,
+                       const shared_ptr<pit::Entry>& pitEntry) override;
 
   void
-  afterContentStoreHit(const shared_ptr<pit::Entry>& pitEntry,
-                       const FaceEndpoint& ingress, const Data& data) override;
+  beforeSatisfyInterest(const Data& data, const FaceEndpoint& ingress,
+                        const shared_ptr<pit::Entry>& pitEntry) override;
 
   void
-  afterReceiveData(const shared_ptr<pit::Entry>& pitEntry,
-                   const FaceEndpoint& ingress, const Data& data) override;
+  afterReceiveData(const Data& data, const FaceEndpoint& ingress,
+                   const shared_ptr<pit::Entry>& pitEntry) override;
 
   void
-  afterReceiveNack(const FaceEndpoint& ingress, const lp::Nack& nack,
+  afterReceiveNack(const lp::Nack& nack, const FaceEndpoint& ingress,
                    const shared_ptr<pit::Entry>& pitEntry) override;
 
   void
@@ -97,11 +99,11 @@
   }
 
 public:
-  int afterReceiveInterest_count;
-  int beforeSatisfyInterest_count;
-  int afterContentStoreHit_count;
-  int afterReceiveData_count;
-  int afterReceiveNack_count;
+  int afterReceiveInterest_count = 0;
+  int afterContentStoreHit_count = 0;
+  int beforeSatisfyInterest_count = 0;
+  int afterReceiveData_count = 0;
+  int afterReceiveNack_count = 0;
 
   // a collection of names of PIT entries that afterNewNextHop() was called on
   std::vector<Name> afterNewNextHopCalls;
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index e3b3a19..12ced16 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -165,14 +165,14 @@
   pitA->insertOrUpdateInRecord(*face1, *interestA1);
 
   auto interestA2 = makeInterest("/A", false, nullopt, 1698);
-  auto outA2 = forwarder.onOutgoingInterest(pitA, *face2, *interestA2);
+  auto outA2 = forwarder.onOutgoingInterest(*interestA2, *face2, pitA);
   BOOST_REQUIRE(outA2 != nullptr);
   BOOST_CHECK_EQUAL(outA2->getLastNonce(), 1698);
 
   // This packet will be dropped because HopLimit=0
   auto interestA3 = makeInterest("/A", false, nullopt, 9876);
   interestA3->setHopLimit(0);
-  auto outA3 = forwarder.onOutgoingInterest(pitA, *face2, *interestA3);
+  auto outA3 = forwarder.onOutgoingInterest(*interestA3, *face2, pitA);
   BOOST_CHECK(outA3 == nullptr);
 
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 1);
@@ -275,47 +275,47 @@
   // local face, /localhost: OK
   strategy.afterReceiveInterest_count = 0;
   auto i1 = makeInterest("/localhost/A1");
-  forwarder.onIncomingInterest(FaceEndpoint(*face1, 0), *i1);
+  forwarder.onIncomingInterest(*i1, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 1);
 
   // non-local face, /localhost: violate
   strategy.afterReceiveInterest_count = 0;
   auto i2 = makeInterest("/localhost/A2");
-  forwarder.onIncomingInterest(FaceEndpoint(*face2, 0), *i2);
+  forwarder.onIncomingInterest(*i2, FaceEndpoint(*face2, 0));
   BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 0);
 
   // local face, non-/localhost: OK
   strategy.afterReceiveInterest_count = 0;
   auto i3 = makeInterest("/A3");
-  forwarder.onIncomingInterest(FaceEndpoint(*face1, 0), *i3);
+  forwarder.onIncomingInterest(*i3, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 1);
 
   // non-local face, non-/localhost: OK
   strategy.afterReceiveInterest_count = 0;
   auto i4 = makeInterest("/A4");
-  forwarder.onIncomingInterest(FaceEndpoint(*face2, 0), *i4);
+  forwarder.onIncomingInterest(*i4, FaceEndpoint(*face2, 0));
   BOOST_CHECK_EQUAL(strategy.afterReceiveInterest_count, 1);
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 0);
 
   // local face, /localhost: OK
   auto d1 = makeData("/localhost/B1");
-  forwarder.onIncomingData(FaceEndpoint(*face1, 0), *d1);
+  forwarder.onIncomingData(*d1, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 1);
 
   // non-local face, /localhost: violate
   auto d2 = makeData("/localhost/B2");
-  forwarder.onIncomingData(FaceEndpoint(*face2, 0), *d2);
+  forwarder.onIncomingData(*d2, FaceEndpoint(*face2, 0));
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 1);
 
   // local face, non-/localhost: OK
   auto d3 = makeData("/B3");
-  forwarder.onIncomingData(FaceEndpoint(*face1, 0), *d3);
+  forwarder.onIncomingData(*d3, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 2);
 
   // non-local face, non-/localhost: OK
   auto d4 = makeData("/B4");
-  forwarder.onIncomingData(FaceEndpoint(*face2, 0), *d4);
+  forwarder.onIncomingData(*d4, FaceEndpoint(*face2, 0));
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 3);
 }
 
@@ -330,31 +330,31 @@
   auto interest1 = makeInterest("/A/1");
   strategyA.afterReceiveInterest_count = 0;
   strategyA.interestOutFace = face2;
-  forwarder.onIncomingInterest(FaceEndpoint(*face1, 0), *interest1);
+  forwarder.onIncomingInterest(*interest1, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveInterest_count, 1);
 
   auto interest2 = makeInterest("/B/2", true);
   strategyB.afterReceiveInterest_count = 0;
   strategyB.interestOutFace = face2;
-  forwarder.onIncomingInterest(FaceEndpoint(*face1, 0), *interest2);
+  forwarder.onIncomingInterest(*interest2, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(strategyB.afterReceiveInterest_count, 1);
 
   this->advanceClocks(1_ms, 5_ms);
 
   auto data1 = makeData("/A/1");
   strategyA.beforeSatisfyInterest_count = 0;
-  forwarder.onIncomingData(FaceEndpoint(*face2, 0), *data1);
+  forwarder.onIncomingData(*data1, FaceEndpoint(*face2, 0));
   BOOST_CHECK_EQUAL(strategyA.beforeSatisfyInterest_count, 1);
 
   auto data2 = makeData("/B/2/b");
   strategyB.beforeSatisfyInterest_count = 0;
-  forwarder.onIncomingData(FaceEndpoint(*face2, 0), *data2);
+  forwarder.onIncomingData(*data2, FaceEndpoint(*face2, 0));
   BOOST_CHECK_EQUAL(strategyB.beforeSatisfyInterest_count, 1);
 
   auto interest3 = makeInterest("/A/3", false, 30_ms);
-  forwarder.onIncomingInterest(FaceEndpoint(*face1, 0), *interest3);
+  forwarder.onIncomingInterest(*interest3, FaceEndpoint(*face1, 0));
   auto interest4 = makeInterest("/B/4", false, 5_s);
-  forwarder.onIncomingInterest(FaceEndpoint(*face1, 0), *interest4);
+  forwarder.onIncomingInterest(*interest4, FaceEndpoint(*face1, 0));
 }
 
 BOOST_AUTO_TEST_CASE(IncomingData)
@@ -378,7 +378,7 @@
   pitC->insertOrUpdateInRecord(*face4, *interestC);
 
   auto dataD = makeData("/A/B/C/D");
-  forwarder.onIncomingData(FaceEndpoint(*face3, 0), *dataD);
+  forwarder.onIncomingData(*dataD, FaceEndpoint(*face3, 0));
   this->advanceClocks(1_ms, 5_ms);
 
   BOOST_CHECK_EQUAL(face1->sentData.size(), 1);
@@ -446,14 +446,14 @@
   auto nack1 = makeNack(*interest1, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(FaceEndpoint(*face1, 0), nack1);
+  forwarder.onIncomingNack(nack1, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 1);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   auto nack2 = makeNack(*interest2, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(FaceEndpoint(*face1, 0), nack2);
+  forwarder.onIncomingNack(nack2, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 1);
 
@@ -467,7 +467,7 @@
   auto nack3 = makeNack(*makeInterest("/yEcw5HhdM", false, nullopt, 243), lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(FaceEndpoint(*face1, 0), nack3);
+  forwarder.onIncomingNack(nack3, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
@@ -479,7 +479,7 @@
   auto nack4a = makeNack(*interest4, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(FaceEndpoint(*face2, 0), nack4a);
+  forwarder.onIncomingNack(nack4a, FaceEndpoint(*face2, 0));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
@@ -487,7 +487,7 @@
   auto nack4b = makeNack(*makeInterest("/Etab4KpY", false, nullopt, 294), lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(FaceEndpoint(*face1, 0), nack4b);
+  forwarder.onIncomingNack(nack4b, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
@@ -495,7 +495,7 @@
   pit4->insertOrUpdateOutRecord(*face3, *interest4);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
-  forwarder.onIncomingNack(FaceEndpoint(*face3, 0), nack4a);
+  forwarder.onIncomingNack(nack4a, FaceEndpoint(*face3, 0));
   BOOST_CHECK_EQUAL(strategyA.afterReceiveNack_count, 0);
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 }
@@ -522,7 +522,7 @@
   pit1->insertOrUpdateInRecord(*face1, *interest1);
 
   face2->sentNacks.clear();
-  BOOST_CHECK(!forwarder.onOutgoingNack(pit1, *face2, nackHeader));
+  BOOST_CHECK(!forwarder.onOutgoingNack(nackHeader, *face2, pit1));
   BOOST_CHECK_EQUAL(face2->sentNacks.size(), 0);
 
   // send Nack with correct Nonce
@@ -534,7 +534,7 @@
   face1->sentNacks.clear();
   face2->sentNacks.clear();
 
-  BOOST_CHECK(forwarder.onOutgoingNack(pit2, *face1, nackHeader));
+  BOOST_CHECK(forwarder.onOutgoingNack(nackHeader, *face1, pit2));
   BOOST_REQUIRE_EQUAL(face1->sentNacks.size(), 1);
   BOOST_CHECK_EQUAL(face1->sentNacks.back().getReason(), lp::NackReason::CONGESTION);
   BOOST_CHECK_EQUAL(face1->sentNacks.back().getInterest().getNonce(), 152);
@@ -545,7 +545,7 @@
   BOOST_CHECK(inRecord2a == pit2->in_end());
 
   // send Nack with correct Nonce
-  BOOST_CHECK(forwarder.onOutgoingNack(pit2, *face2, nackHeader));
+  BOOST_CHECK(forwarder.onOutgoingNack(nackHeader, *face2, pit2));
   BOOST_CHECK_EQUAL(face1->sentNacks.size(), 1);
   BOOST_REQUIRE_EQUAL(face2->sentNacks.size(), 1);
   BOOST_CHECK_EQUAL(face2->sentNacks.back().getReason(), lp::NackReason::CONGESTION);
@@ -560,7 +560,7 @@
   pit2->insertOrUpdateInRecord(*face3, *interest2c);
 
   face3->sentNacks.clear();
-  BOOST_CHECK(!forwarder.onOutgoingNack(pit2, *face3, nackHeader));
+  BOOST_CHECK(!forwarder.onOutgoingNack(nackHeader, *face3, pit2));
   BOOST_CHECK_EQUAL(face3->sentNacks.size(), 0);
 
   // don't send Nack to face with invalid ID
@@ -568,7 +568,7 @@
   pit1->insertOrUpdateInRecord(*face4, *interest1b);
 
   face4->sentNacks.clear();
-  BOOST_CHECK(!forwarder.onOutgoingNack(pit1, *face4, nackHeader));
+  BOOST_CHECK(!forwarder.onOutgoingNack(nackHeader, *face4, pit1));
   BOOST_CHECK_EQUAL(face4->sentNacks.size(), 0);
 }
 
@@ -643,7 +643,6 @@
   // interest should be forwarded only once, as long as Nonce is in Dead Nonce List
   BOOST_ASSERT(25_ms * 40 < forwarder.getDeadNonceList().getLifetime());
   this->advanceClocks(25_ms, 40);
-
   BOOST_CHECK_EQUAL(face2->sentInterests.size(), 1);
 
   // It's unnecessary to check that Interest with duplicate Nonce can be forwarded again
@@ -658,12 +657,12 @@
   auto face1 = addFace();
   auto interest = makeInterest("/hcLSAsQ9A", false, 2_s, 61883075);
 
-  DeadNonceList& dnl = forwarder.getDeadNonceList();
+  auto& dnl = forwarder.getDeadNonceList();
   dnl.add(interest->getName(), interest->getNonce());
-  Pit& pit = forwarder.getPit();
-  BOOST_REQUIRE_EQUAL(pit.size(), 0);
+  auto& pit = forwarder.getPit();
+  BOOST_CHECK_EQUAL(pit.size(), 0);
 
-  forwarder.onIncomingInterest(FaceEndpoint(*face1, 0), *interest);
+  forwarder.onIncomingInterest(*interest, FaceEndpoint(*face1, 0));
   this->advanceClocks(100_ms, 20_s);
   BOOST_CHECK_EQUAL(pit.size(), 0);
 }
@@ -674,7 +673,7 @@
   auto data = makeData("/A");
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 0);
-  forwarder.onIncomingData(FaceEndpoint(*face1, 0), *data);
+  forwarder.onIncomingData(*data, FaceEndpoint(*face1, 0));
   this->advanceClocks(1_ms, 10_ms);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nUnsolicitedData, 1);
 }
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index a75bf30..90e4b1e 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -87,7 +87,7 @@
   auto pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*face1, *interest);
 
-  strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face1, 0), pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 0);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.size(), 1);
 
@@ -98,7 +98,7 @@
   pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*face2, *interest);
 
-  strategy.afterReceiveInterest(FaceEndpoint(*face2, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face2, 0), pitEntry);
   // Since the interest is the same as the one sent out earlier, the PIT entry should not be
   // rejected, as any data coming back must be able to satisfy the original interest from face 1
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 0);
@@ -164,7 +164,7 @@
   auto pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*face3, *interest);
 
-  strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face3, 0), pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 0);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.size(), 2);
   BOOST_TEST(didSendInterestTo(*face1));
@@ -180,7 +180,7 @@
   std::function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
   periodicalRetxFrom4 = [&] {
     pitEntry->insertOrUpdateInRecord(*face3, *interest);
-    strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), *interest, pitEntry);
+    strategy.afterReceiveInterest(*interest, FaceEndpoint(*face3, 0), pitEntry);
 
     size_t nSent = strategy.sendInterestHistory.size();
     if (nSent > nSentLast) {
@@ -208,7 +208,7 @@
   auto pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*face1, *interest);
 
-  strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face1, 0), pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 0);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.size(), 0);
 }
@@ -228,7 +228,7 @@
   auto interest = makeInterest("/t8ZiSOi3");
   auto pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*face1, *interest);
-  strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face1, 0), pitEntry);
 
   // forwarded to faces 2 and 3
   BOOST_TEST(strategy.sendInterestHistory.size() == 2);
@@ -243,7 +243,7 @@
   interest->refreshNonce();
   pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*face2, *interest);
-  strategy.afterReceiveInterest(FaceEndpoint(*face2, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face2, 0), pitEntry);
 
   // forwarded only to face 1, suppressed on face 3
   BOOST_TEST(strategy.sendInterestHistory.size() == 1);
@@ -257,7 +257,7 @@
   interest->refreshNonce();
   pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*face3, *interest);
-  strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face3, 0), pitEntry);
 
   // suppressed on face 1, forwarded on face 2 (and suppression window doubles)
   BOOST_TEST(strategy.sendInterestHistory.size() == 1);
@@ -271,7 +271,7 @@
   interest->refreshNonce();
   pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*face3, *interest);
-  strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face3, 0), pitEntry);
 
   // forwarded only to face 1, suppressed on face 2
   BOOST_TEST(strategy.sendInterestHistory.size() == 1);
@@ -285,7 +285,7 @@
   interest->refreshNonce();
   pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*face1, *interest);
-  strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face1, 0), pitEntry);
 
   // forwarded to faces 2 and 3
   BOOST_TEST(strategy.sendInterestHistory.size() == 2);
@@ -304,7 +304,7 @@
   auto pitEntry = pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*face1, *interest);
 
-  strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest, pitEntry);
+  strategy.afterReceiveInterest(*interest, FaceEndpoint(*face1, 0), pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 0);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.size(), 1);
 
@@ -492,12 +492,12 @@
   auto interest = makeInterest("ndn:/localhop/H0D6i5fc");
   auto pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->inFace1, *interest);
-  this->strategy.afterReceiveInterest(FaceEndpoint(*this->inFace1, 0), *interest, pitEntry);
+  this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->inFace1, 0), pitEntry);
 
   if (this->inFace2 != nullptr) {
     auto interest2 = makeInterest("ndn:/localhop/H0D6i5fc");
     pitEntry->insertOrUpdateInRecord(*this->inFace2, *interest2);
-    this->strategy.afterReceiveInterest(FaceEndpoint(*this->inFace2, 0), *interest2, pitEntry);
+    this->strategy.afterReceiveInterest(*interest2, FaceEndpoint(*this->inFace2, 0), pitEntry);
   }
 
   this->strategy.sendInterestHistory.clear();
diff --git a/tests/daemon/fw/pit-expiry.t.cpp b/tests/daemon/fw/pit-expiry.t.cpp
index 4b5345e..099d031 100644
--- a/tests/daemon/fw/pit-expiry.t.cpp
+++ b/tests/daemon/fw/pit-expiry.t.cpp
@@ -62,10 +62,10 @@
   }
 
   void
-  afterReceiveInterest(const FaceEndpoint& ingress, const Interest& interest,
+  afterReceiveInterest(const Interest& interest, const FaceEndpoint& ingress,
                        const shared_ptr<pit::Entry>& pitEntry) override
   {
-    DummyStrategy::afterReceiveInterest(ingress, interest, pitEntry);
+    DummyStrategy::afterReceiveInterest(interest, ingress, pitEntry);
 
     if (afterReceiveInterest_count <= 1) {
       setExpiryTimer(pitEntry, 190_ms);
@@ -73,10 +73,21 @@
   }
 
   void
-  beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
-                        const FaceEndpoint& ingress, const Data& data) override
+  afterContentStoreHit(const Data& data, const FaceEndpoint& ingress,
+                       const shared_ptr<pit::Entry>& pitEntry) override
   {
-    DummyStrategy::beforeSatisfyInterest(pitEntry, ingress, data);
+    if (afterContentStoreHit_count == 0) {
+      setExpiryTimer(pitEntry, 190_ms);
+    }
+
+    DummyStrategy::afterContentStoreHit(data, ingress, pitEntry);
+  }
+
+  void
+  beforeSatisfyInterest(const Data& data, const FaceEndpoint& ingress,
+                        const shared_ptr<pit::Entry>& pitEntry) override
+  {
+    DummyStrategy::beforeSatisfyInterest(data, ingress, pitEntry);
 
     if (beforeSatisfyInterest_count <= 2) {
       setExpiryTimer(pitEntry, 190_ms);
@@ -84,19 +95,8 @@
   }
 
   void
-  afterContentStoreHit(const shared_ptr<pit::Entry>& pitEntry,
-                       const FaceEndpoint& ingress, const Data& data) override
-  {
-    if (afterContentStoreHit_count == 0) {
-      setExpiryTimer(pitEntry, 190_ms);
-    }
-
-    DummyStrategy::afterContentStoreHit(pitEntry, ingress, data);
-  }
-
-  void
-  afterReceiveData(const shared_ptr<pit::Entry>& pitEntry,
-                   const FaceEndpoint& ingress, const Data& data) override
+  afterReceiveData(const Data& data, const FaceEndpoint& ingress,
+                   const shared_ptr<pit::Entry>& pitEntry) override
   {
     ++afterReceiveData_count;
 
@@ -104,14 +104,14 @@
       setExpiryTimer(pitEntry, 290_ms);
     }
 
-    this->sendDataToAll(pitEntry, ingress.face, data);
+    this->sendDataToAll(data, pitEntry, ingress.face);
   }
 
   void
-  afterReceiveNack(const FaceEndpoint& ingress, const lp::Nack& nack,
+  afterReceiveNack(const lp::Nack& nack, const FaceEndpoint& ingress,
                    const shared_ptr<pit::Entry>& pitEntry) override
   {
-    DummyStrategy::afterReceiveNack(ingress, nack, pitEntry);
+    DummyStrategy::afterReceiveNack(nack, ingress, pitEntry);
 
     if (afterReceiveNack_count <= 1) {
       setExpiryTimer(pitEntry, 50_ms);
diff --git a/tests/daemon/fw/random-strategy.t.cpp b/tests/daemon/fw/random-strategy.t.cpp
index 4822e4c..d2291c5 100644
--- a/tests/daemon/fw/random-strategy.t.cpp
+++ b/tests/daemon/fw/random-strategy.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -78,22 +78,22 @@
 
   // Send 1000 Interests
   for (int i = 0; i < 1000; ++i) {
-    shared_ptr<Interest> interest = makeInterest("ndn:/BzgFBchqA" + std::to_string(i));
-    shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
+    auto interest = makeInterest("ndn:/BzgFBchqA" + std::to_string(i));
+    auto pitEntry = pit.insert(*interest).first;
 
     pitEntry->insertOrUpdateInRecord(*face1, *interest);
-    strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest, pitEntry);
+    strategy.afterReceiveInterest(*interest, FaceEndpoint(*face1, 0), pitEntry);
   }
 
-  // Map outFaceId -> SentInterests.
-  std::unordered_map<int, int> faceInterestMap;
+  // Map outFaceId -> SentInterests
+  std::unordered_map<FaceId, int> faceInterestMap;
   for (const auto& i : strategy.sendInterestHistory) {
     faceInterestMap[i.outFaceId]++;
   }
 
   // Check that all faces received at least 10 Interest
   for (const auto& x : faceInterestMap) {
-    BOOST_CHECK_GE(x.second, 10);
+    BOOST_TEST(x.second >= 10);
   }
 }
 
diff --git a/tests/daemon/fw/strategy-nack-return.t.cpp b/tests/daemon/fw/strategy-nack-return.t.cpp
index 5811652..9b5f588 100644
--- a/tests/daemon/fw/strategy-nack-return.t.cpp
+++ b/tests/daemon/fw/strategy-nack-return.t.cpp
@@ -108,7 +108,7 @@
   pitEntry->getOutRecord(*this->face3)->setIncomingNack(nack3);
 
   auto f = [&] {
-    this->strategy.afterReceiveNack(FaceEndpoint(*this->face3, 0), nack3, pitEntry);
+    this->strategy.afterReceiveNack(nack3, FaceEndpoint(*this->face3, 0), pitEntry);
   };
   BOOST_REQUIRE(this->strategy.waitForAction(f, this->limitedIo, 2));
 
@@ -144,7 +144,7 @@
 
   lp::Nack nack3 = makeNack(*interest1, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*this->face3)->setIncomingNack(nack3);
-  this->strategy.afterReceiveNack(FaceEndpoint(*this->face3, 0), nack3, pitEntry);
+  this->strategy.afterReceiveNack(nack3, FaceEndpoint(*this->face3, 0), pitEntry);
 
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.size(), 0); // don't send Nack until all upstreams have Nacked
 
@@ -152,7 +152,7 @@
   pitEntry->getOutRecord(*this->face4)->setIncomingNack(nack4);
 
   auto f = [&] {
-    this->strategy.afterReceiveNack(FaceEndpoint(*this->face4, 0), nack4, pitEntry);
+    this->strategy.afterReceiveNack(nack4, FaceEndpoint(*this->face4, 0), pitEntry);
   };
   BOOST_REQUIRE(this->strategy.waitForAction(f, this->limitedIo));
 
@@ -186,7 +186,7 @@
 
   lp::Nack nack4 = makeNack(*interest2, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*this->face4)->setIncomingNack(nack4);
-  this->strategy.afterReceiveNack(FaceEndpoint(*this->face4, 0), nack4, pitEntry);
+  this->strategy.afterReceiveNack(nack4, FaceEndpoint(*this->face4, 0), pitEntry);
 
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.size(), 0);
 }
@@ -333,13 +333,13 @@
 
   lp::Nack nack3 = makeNack(*interest1, Combination::getX());
   pitEntry->getOutRecord(*face3)->setIncomingNack(nack3);
-  strategy.afterReceiveNack(FaceEndpoint(*face3, 0), nack3, pitEntry);
+  strategy.afterReceiveNack(nack3, FaceEndpoint(*face3, 0), pitEntry);
 
   BOOST_CHECK_EQUAL(strategy.sendNackHistory.size(), 0);
 
   lp::Nack nack4 = makeNack(*interest1, Combination::getY());
   pitEntry->getOutRecord(*face4)->setIncomingNack(nack4);
-  strategy.afterReceiveNack(FaceEndpoint(*face4, 0), nack4, pitEntry);
+  strategy.afterReceiveNack(nack4, FaceEndpoint(*face4, 0), pitEntry);
 
   BOOST_REQUIRE_EQUAL(strategy.sendNackHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].pitInterest.wireEncode(),
diff --git a/tests/daemon/fw/strategy-no-route.t.cpp b/tests/daemon/fw/strategy-no-route.t.cpp
index 93a6367..cec64c4 100644
--- a/tests/daemon/fw/strategy-no-route.t.cpp
+++ b/tests/daemon/fw/strategy-no-route.t.cpp
@@ -165,7 +165,7 @@
   pitEntry->insertOrUpdateInRecord(*this->face1, *interest);
 
   auto f = [&] {
-    this->strategy.afterReceiveInterest(FaceEndpoint(*this->face1, 0), *interest, pitEntry);
+    this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->face1, 0), pitEntry);
   };
   BOOST_REQUIRE(this->strategy.waitForAction(f, this->limitedIo, 2));
 
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 5c6c552..6fd052e 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.t.cpp
@@ -128,7 +128,7 @@
   pitEntry->insertOrUpdateInRecord(*this->localFace3, *interest);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
-    [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->localFace3, 0), *interest, pitEntry); },
+    [&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->localFace3, 0), pitEntry); },
     this->limitedIo));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 1);
@@ -147,7 +147,7 @@
   pitEntry->insertOrUpdateInRecord(*this->localFace3, *interest);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
-    [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->localFace3, 0), *interest, pitEntry); },
+    [&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->localFace3, 0), pitEntry); },
     this->limitedIo, T::willRejectPitEntry() + T::willSendNackNoRoute()));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
@@ -170,7 +170,7 @@
   pitEntry->insertOrUpdateInRecord(*this->localFace3, *interest);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
-    [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->localFace3, 0), *interest, pitEntry); },
+    [&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->localFace3, 0), pitEntry); },
     this->limitedIo));
 
   BOOST_REQUIRE_EQUAL(this->strategy.sendInterestHistory.size(), 1);
@@ -190,7 +190,7 @@
   pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, *interest);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
-    [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->nonLocalFace1, 0), *interest, pitEntry); },
+    [&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->nonLocalFace1, 0), pitEntry); },
     this->limitedIo, T::willRejectPitEntry() + T::willSendNackNoRoute()));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
@@ -213,7 +213,7 @@
   pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, *interest);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
-    [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->nonLocalFace1, 0), *interest, pitEntry); },
+    [&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->nonLocalFace1, 0), pitEntry); },
     this->limitedIo));
 
   BOOST_REQUIRE_EQUAL(this->strategy.sendInterestHistory.size(), 1);
@@ -236,7 +236,7 @@
   pitEntry->insertOrUpdateOutRecord(*this->localFace4, *interest)->setIncomingNack(nack);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
-    [&] { this->strategy.afterReceiveNack(FaceEndpoint(*this->localFace4, 0), nack, pitEntry); },
+    [&] { this->strategy.afterReceiveNack(nack, FaceEndpoint(*this->localFace4, 0), pitEntry); },
     this->limitedIo, T::canProcessNack()));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
@@ -261,7 +261,7 @@
   pitEntry->insertOrUpdateOutRecord(*this->localFace4, *interest)->setIncomingNack(nack);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
-    [&] { this->strategy.afterReceiveNack(FaceEndpoint(*this->localFace4, 0), nack, pitEntry); },
+    [&] { this->strategy.afterReceiveNack(nack, FaceEndpoint(*this->localFace4, 0), pitEntry); },
     this->limitedIo, T::canProcessNack()));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
diff --git a/tests/daemon/fw/strategy-tester.hpp b/tests/daemon/fw/strategy-tester.hpp
index b9ed2ff..03c2f77 100644
--- a/tests/daemon/fw/strategy-tester.hpp
+++ b/tests/daemon/fw/strategy-tester.hpp
@@ -103,8 +103,8 @@
 
 protected:
   pit::OutRecord*
-  sendInterest(const shared_ptr<pit::Entry>& pitEntry, Face& egress,
-               const Interest& interest) override
+  sendInterest(const Interest& interest, Face& egress,
+               const shared_ptr<pit::Entry>& pitEntry) override
   {
     sendInterestHistory.push_back({pitEntry->getInterest(), egress.getId(), interest});
     auto it = pitEntry->insertOrUpdateOutRecord(egress, interest);
@@ -121,8 +121,8 @@
   }
 
   bool
-  sendNack(const shared_ptr<pit::Entry>& pitEntry, Face& egress,
-           const lp::NackHeader& header) override
+  sendNack(const lp::NackHeader& header, Face& egress,
+           const shared_ptr<pit::Entry>& pitEntry) override
   {
     sendNackHistory.push_back({pitEntry->getInterest(), egress.getId(), header});
     pitEntry->deleteInRecord(egress);
diff --git a/tests/daemon/fw/unsolicited-data-policy.t.cpp b/tests/daemon/fw/unsolicited-data-policy.t.cpp
index 21894ca..bc95d4f 100644
--- a/tests/daemon/fw/unsolicited-data-policy.t.cpp
+++ b/tests/daemon/fw/unsolicited-data-policy.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-2021,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -94,18 +94,18 @@
 template<typename Policy, bool shouldAdmitLocal, bool shouldAdmitNonLocal>
 struct FaceScopePolicyTest
 {
-  typedef Policy PolicyType;
-  typedef std::integral_constant<bool, shouldAdmitLocal> ShouldAdmitLocal;
-  typedef std::integral_constant<bool, shouldAdmitNonLocal> ShouldAdmitNonLocal;
+  using PolicyType = Policy;
+  using ShouldAdmitLocal = std::integral_constant<bool, shouldAdmitLocal>;
+  using ShouldAdmitNonLocal = std::integral_constant<bool, shouldAdmitNonLocal>;
 };
 
-typedef boost::mpl::vector<
+using FaceScopePolicyTests = boost::mpl::vector<
   FaceScopePolicyTest<void, false, false>, // default policy
   FaceScopePolicyTest<DropAllUnsolicitedDataPolicy, false, false>,
   FaceScopePolicyTest<AdmitLocalUnsolicitedDataPolicy, true, false>,
   FaceScopePolicyTest<AdmitNetworkUnsolicitedDataPolicy, false, true>,
   FaceScopePolicyTest<AdmitAllUnsolicitedDataPolicy, true, true>
-> FaceScopePolicyTests;
+>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(FaceScopePolicy, T, FaceScopePolicyTests)
 {
@@ -115,16 +115,16 @@
                                       ndn::nfd::FACE_SCOPE_LOCAL);
   faceTable.add(face1);
 
-  shared_ptr<Data> data1 = makeData("/unsolicited-from-local");
-  forwarder.onIncomingData(FaceEndpoint(*face1, 0), *data1);
+  auto data1 = makeData("/unsolicited-from-local");
+  forwarder.onIncomingData(*data1, FaceEndpoint(*face1, 0));
   BOOST_CHECK_EQUAL(isInCs(*data1), T::ShouldAdmitLocal::value);
 
   auto face2 = make_shared<DummyFace>("dummy://", "dummy://",
                                       ndn::nfd::FACE_SCOPE_NON_LOCAL);
   faceTable.add(face2);
 
-  shared_ptr<Data> data2 = makeData("/unsolicited-from-non-local");
-  forwarder.onIncomingData(FaceEndpoint(*face2, 0), *data2);
+  auto data2 = makeData("/unsolicited-from-non-local");
+  forwarder.onIncomingData(*data2, FaceEndpoint(*face2, 0));
   BOOST_CHECK_EQUAL(isInCs(*data2), T::ShouldAdmitNonLocal::value);
 }
 
