tests: avoid comparing Interests with operator==

Refs: #4569
Change-Id: Ia75169c147976d3980dd113054ba560caf0f33c8
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 4c2d8d0..247821a 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -504,7 +504,7 @@
   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);
+  BOOST_CHECK_EQUAL(face2->sentNacks.back().getInterest().wireEncode(), interest2a->wireEncode());
   BOOST_CHECK_EQUAL(face2->sentNacks.back().getReason(), lp::NackReason::DUPLICATE);
 
   // receive Interest with new Nonce on face2
diff --git a/tests/daemon/fw/strategy-nack-return.t.cpp b/tests/daemon/fw/strategy-nack-return.t.cpp
index 41b59e2..df2c1bb 100644
--- a/tests/daemon/fw/strategy-nack-return.t.cpp
+++ b/tests/daemon/fw/strategy-nack-return.t.cpp
@@ -107,17 +107,21 @@
   lp::Nack nack3 = makeNack(*interest1, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*this->face3, 0)->setIncomingNack(nack3);
 
-  BOOST_REQUIRE(this->strategy.waitForAction(
-    [&] { this->strategy.afterReceiveNack(FaceEndpoint(*this->face3, 0), nack3, pitEntry); },
-    this->limitedIo, 2));
+  auto f = [&] {
+    this->strategy.afterReceiveNack(FaceEndpoint(*this->face3, 0), nack3, pitEntry);
+  };
+  BOOST_REQUIRE(this->strategy.waitForAction(f, this->limitedIo, 2));
 
   BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 2);
-  BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].pitInterest, pitEntry->getInterest());
+  BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].pitInterest.wireEncode(),
+                    pitEntry->getInterest().wireEncode());
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].header.getReason(), lp::NackReason::CONGESTION);
-  BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[1].pitInterest, pitEntry->getInterest());
+  BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[1].pitInterest.wireEncode(),
+                    pitEntry->getInterest().wireEncode());
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[1].header.getReason(), lp::NackReason::CONGESTION);
+
   std::set<FaceId> nackFaceIds{this->strategy.sendNackHistory[0].outFaceId,
-                                         this->strategy.sendNackHistory[1].outFaceId};
+                               this->strategy.sendNackHistory[1].outFaceId};
   std::set<FaceId> expectedNackFaceIds{this->face1->getId(), this->face2->getId()};
   BOOST_CHECK_EQUAL_COLLECTIONS(nackFaceIds.begin(), nackFaceIds.end(),
                                 expectedNackFaceIds.begin(), expectedNackFaceIds.end());
@@ -146,12 +150,15 @@
 
   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); },
-    this->limitedIo));
+
+  auto f = [&] {
+    this->strategy.afterReceiveNack(FaceEndpoint(*this->face4, 0), nack4, pitEntry);
+  };
+  BOOST_REQUIRE(this->strategy.waitForAction(f, this->limitedIo));
 
   BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
-  BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].pitInterest, pitEntry->getInterest());
+  BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].pitInterest.wireEncode(),
+                    pitEntry->getInterest().wireEncode());
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].outFaceId, this->face1->getId());
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].header.getReason(), lp::NackReason::CONGESTION);
 }
@@ -334,7 +341,8 @@
   strategy.afterReceiveNack(FaceEndpoint(*face4, 0), nack4, pitEntry);
 
   BOOST_REQUIRE_EQUAL(strategy.sendNackHistory.size(), 1);
-  BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].pitInterest, pitEntry->getInterest());
+  BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].pitInterest.wireEncode(),
+                    pitEntry->getInterest().wireEncode());
   BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].outFaceId, face1->getId());
   BOOST_CHECK_EQUAL(strategy.sendNackHistory[0].header.getReason(), Combination::getExpectedResult());
 }
diff --git a/tests/daemon/fw/strategy-no-route.t.cpp b/tests/daemon/fw/strategy-no-route.t.cpp
index d554d47..cea980f 100644
--- a/tests/daemon/fw/strategy-no-route.t.cpp
+++ b/tests/daemon/fw/strategy-no-route.t.cpp
@@ -157,19 +157,22 @@
   typename T::Case scenario;
   scenario.insertFibEntry(this);
 
-  shared_ptr<Interest> interest = makeInterest(scenario.getInterestName());
-  shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
+  auto interest = makeInterest(scenario.getInterestName());
+  auto pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->face1, 0, *interest);
 
-  BOOST_REQUIRE(this->strategy.waitForAction(
-    [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->face1, 0), *interest, pitEntry); },
-    this->limitedIo, 2));
+  auto f = [&] {
+    this->strategy.afterReceiveInterest(FaceEndpoint(*this->face1, 0), *interest, pitEntry);
+  };
+  BOOST_REQUIRE(this->strategy.waitForAction(f, this->limitedIo, 2));
 
   BOOST_REQUIRE_EQUAL(this->strategy.rejectPendingInterestHistory.size(), 1);
-  BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory[0].pitInterest, pitEntry->getInterest());
+  BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory[0].pitInterest.wireEncode(),
+                    pitEntry->getInterest().wireEncode());
 
   BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
-  BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].pitInterest, pitEntry->getInterest());
+  BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].pitInterest.wireEncode(),
+                    pitEntry->getInterest().wireEncode());
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].outFaceId, this->face1->getId());
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory[0].header.getReason(), lp::NackReason::NO_ROUTE);
 }