diff --git a/daemon/table/pit-entry.cpp b/daemon/table/pit-entry.cpp
index 4f6f3f4..4de7bcd 100644
--- a/daemon/table/pit-entry.cpp
+++ b/daemon/table/pit-entry.cpp
@@ -43,8 +43,9 @@
 
   return m_interest->getName().compare(nEqualNameComps, Name::npos,
                                        interest.getName(), nEqualNameComps) == 0 &&
-         m_interest->getSelectors() == interest.getSelectors();
-  /// \todo #3162 match Link field
+         m_interest->getCanBePrefix() == interest.getCanBePrefix() &&
+         m_interest->getMustBeFresh() == interest.getMustBeFresh();
+  /// \todo #3162 match ForwardingHint field
 }
 
 InRecordCollection::iterator
diff --git a/tests/daemon/table/name-tree.t.cpp b/tests/daemon/table/name-tree.t.cpp
index b42de83..6c2f627 100644
--- a/tests/daemon/table/name-tree.t.cpp
+++ b/tests/daemon/table/name-tree.t.cpp
@@ -239,9 +239,10 @@
   BOOST_CHECK_EQUAL(npe.hasTableEntries(), false);
   BOOST_CHECK_EQUAL(npe.isEmpty(), true);
 
-  auto pit1 = make_shared<pit::Entry>(*makeInterest(name));
-  shared_ptr<Interest> interest2 = makeInterest(name);
-  interest2->setMinSuffixComponents(2);
+  auto interest1 = makeInterest(name);
+  auto pit1 = make_shared<pit::Entry>(*interest1);
+  auto interest2 = makeInterest(name);
+  interest2->setMustBeFresh(true);
   auto pit2 = make_shared<pit::Entry>(*interest2);
 
   npe.insertPitEntry(pit1);
diff --git a/tests/daemon/table/pit-entry.t.cpp b/tests/daemon/table/pit-entry.t.cpp
index ac6709b..221753b 100644
--- a/tests/daemon/table/pit-entry.t.cpp
+++ b/tests/daemon/table/pit-entry.t.cpp
@@ -41,26 +41,23 @@
 BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(CanMatch, 1)
 BOOST_AUTO_TEST_CASE(CanMatch)
 {
-  shared_ptr<Interest> interest0 = makeInterest("/A");
+  auto interest0 = makeInterest("/A");
   Entry entry(*interest0);
 
-  shared_ptr<Interest> interest1 = makeInterest("/B");
+  auto interest1 = makeInterest("/B");
   BOOST_CHECK_EQUAL(entry.canMatch(*interest1), false);
 
-  shared_ptr<Interest> interest2 = makeInterest("/A");
-  interest2->setNonce(27956);
+  auto interest2 = makeInterest("/A", false, nullopt, 27956);
   BOOST_CHECK_EQUAL(entry.canMatch(*interest2), true);
 
-  shared_ptr<Interest> interest3 = makeInterest("/A");
-  interest3->setInterestLifetime(6210_ms);
+  auto interest3 = makeInterest("/A", false, 6210_ms);
   BOOST_CHECK_EQUAL(entry.canMatch(*interest3), true);
 
-  shared_ptr<Interest> interest4 = makeInterest("/A");
+  auto interest4 = makeInterest("/A");
   interest4->setForwardingHint({{10, "/telia/terabits"}, {20, "/ucla/cs"}});
   BOOST_CHECK_EQUAL(entry.canMatch(*interest4), false); // expected failure until #3162
 
-  shared_ptr<Interest> interest5 = makeInterest("/A");
-  interest5->setMaxSuffixComponents(21);
+  auto interest5 = makeInterest("/A", true);
   BOOST_CHECK_EQUAL(entry.canMatch(*interest5), false);
 }
 
@@ -69,20 +66,12 @@
   auto face1 = make_shared<DummyFace>();
   auto face2 = make_shared<DummyFace>();
 
-  Name name("ndn:/KuYfjtRq");
+  Name name("/KuYfjtRq");
   auto interest = makeInterest(name);
-  auto interest1 = makeInterest(name);
-  interest1->setInterestLifetime(2528_ms);
-  interest1->setNonce(25559);
-  auto interest2 = makeInterest(name);
-  interest2->setInterestLifetime(6464_ms);
-  interest2->setNonce(19004);
-  auto interest3 = makeInterest(name);
-  interest3->setInterestLifetime(3585_ms);
-  interest3->setNonce(24216);
-  auto interest4 = makeInterest(name);
-  interest4->setInterestLifetime(8795_ms);
-  interest4->setNonce(17365);
+  auto interest1 = makeInterest(name, false, 2528_ms, 25559);
+  auto interest2 = makeInterest(name, false, 6464_ms, 19004);
+  auto interest3 = makeInterest(name, false, 3585_ms, 24216);
+  auto interest4 = makeInterest(name, false, 8795_ms, 17365);
 
   Entry entry(*interest);
 
@@ -194,7 +183,7 @@
 
 BOOST_AUTO_TEST_CASE(Lifetime)
 {
-  auto interest = makeInterest("ndn:/7oIEurbgy6");
+  auto interest = makeInterest("/7oIEurbgy6");
   auto face = make_shared<DummyFace>();
   Entry entry(*interest);
 
@@ -211,12 +200,12 @@
   OutRecord outR(*face1, 0);
   BOOST_CHECK(outR.getIncomingNack() == nullptr);
 
-  auto interest1 = makeInterest("ndn:/uWiapGjYL");
+  auto interest1 = makeInterest("/uWiapGjYL");
   interest1->setNonce(165);
   outR.update(*interest1);
   BOOST_CHECK(outR.getIncomingNack() == nullptr);
 
-  auto interest2 = makeInterest("ndn:/uWiapGjYL");
+  auto interest2 = makeInterest("/uWiapGjYL");
   interest2->setNonce(996);
   lp::Nack nack2(*interest2);
   nack2.setReason(lp::NackReason::CONGESTION);
diff --git a/tests/daemon/table/pit.t.cpp b/tests/daemon/table/pit.t.cpp
index d5d77e9..99d23e7 100644
--- a/tests/daemon/table/pit.t.cpp
+++ b/tests/daemon/table/pit.t.cpp
@@ -29,8 +29,6 @@
 #include "tests/daemon/global-io-fixture.hpp"
 #include "tests/daemon/face/dummy-face.hpp"
 
-#include <ndn-cxx/exclude.hpp>
-
 namespace nfd {
 namespace pit {
 namespace tests {
@@ -61,108 +59,62 @@
 
 BOOST_AUTO_TEST_CASE(Insert)
 {
-  Name name1("ndn:/5vzBNnMst");
-  Name name2("ndn:/igSGfEIM62");
-  ndn::Exclude exclude1;
-  exclude1.excludeOne(Name::Component("u26p47oep"));
-  ndn::Exclude exclude2;
-  exclude2.excludeBefore(Name::Component("u26p47oep"));
-  ndn::KeyLocator keyLocator1("ndn:/sGAE3peMHA");
-  ndn::KeyLocator keyLocator2("ndn:/nIJH6pr4");
+  Name name1("/5vzBNnMst");
+  Name name2("/igSGfEIM62");
 
   NameTree nameTree(16);
   Pit pit(nameTree);
   BOOST_CHECK_EQUAL(pit.size(), 0);
-  std::pair<shared_ptr<Entry>, bool> insertResult;
+
+  shared_ptr<Entry> entry;
+  bool isNew = false;
 
   // base
-  auto interestA = make_shared<Interest>(name1);
-  insertResult = pit.insert(*interestA);
-  BOOST_CHECK_EQUAL(insertResult.second, true);
+  auto interestA = makeInterest(name1, false, nullopt, 2148);
+  std::tie(entry, isNew) = pit.insert(*interestA);
+  BOOST_CHECK_EQUAL(isNew, true);
   BOOST_CHECK_EQUAL(pit.size(), 1);
 
-  // same as A
+  // same Interest, same PIT entry
   auto interestA2 = make_shared<Interest>(*interestA);
-  insertResult = pit.insert(*interestA2);
-  BOOST_CHECK_EQUAL(insertResult.second, false); // sharing the same PIT entry
+  std::tie(entry, isNew) = pit.insert(*interestA2);
+  BOOST_CHECK_EQUAL(isNew, false);
   BOOST_CHECK_EQUAL(pit.size(), 1);
 
-  // A+MinSuffixComponents
+  // different CanBePrefix, different PIT entry
   auto interestB = make_shared<Interest>(*interestA);
-  interestB->setMinSuffixComponents(2);
-  insertResult = pit.insert(*interestB);
-  BOOST_CHECK_EQUAL(insertResult.second, true);
+  interestB->setCanBePrefix(true);
+  std::tie(entry, isNew) = pit.insert(*interestB);
+  BOOST_CHECK_EQUAL(isNew, true);
   BOOST_CHECK_EQUAL(pit.size(), 2);
 
-  // A+MaxSuffixComponents
+  // different MustBeFresh, different PIT entry
   auto interestC = make_shared<Interest>(*interestA);
-  interestC->setMaxSuffixComponents(4);
-  insertResult = pit.insert(*interestC);
-  BOOST_CHECK_EQUAL(insertResult.second, true);
+  interestC->setMustBeFresh(true);
+  std::tie(entry, isNew) = pit.insert(*interestC);
+  BOOST_CHECK_EQUAL(isNew, true);
   BOOST_CHECK_EQUAL(pit.size(), 3);
 
-  // A+KeyLocator1
+  // different InterestLifetime, same PIT entry
   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);
+  interestD->setInterestLifetime(1_s);
+  std::tie(entry, isNew) = pit.insert(*interestD);
+  BOOST_CHECK_EQUAL(isNew, false);
+  BOOST_CHECK_EQUAL(pit.size(), 3);
 
-  // A+KeyLocator2
+  // different Nonce, same PIT entry
   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);
+  interestE->setNonce(2192);
+  std::tie(entry, isNew) = pit.insert(*interestE);
+  BOOST_CHECK_EQUAL(isNew, false);
+  BOOST_CHECK_EQUAL(pit.size(), 3);
 
-  // A+Exclude1
+  // different name, different PIT entry
   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
-  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
-  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
-  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
-  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
-  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
-  auto interestM = make_shared<Interest>(name2);
-  interestM->setExclude(exclude1);
-  insertResult = pit.insert(*interestM);
-  BOOST_CHECK_EQUAL(insertResult.second, true);
-  BOOST_CHECK_EQUAL(pit.size(), 10);
+  interestF->setName(name2);
+  std::tie(entry, isNew) = pit.insert(*interestF);
+  BOOST_CHECK_EQUAL(isNew, true);
+  BOOST_CHECK_EQUAL(pit.size(), 4);
 }
 
 BOOST_AUTO_TEST_CASE(Erase)
@@ -172,26 +124,27 @@
   NameTree nameTree(16);
   Pit pit(nameTree);
 
-  std::pair<shared_ptr<Entry>, bool> insertResult;
+  shared_ptr<Entry> entry;
+  bool isNew = false;
 
   BOOST_CHECK_EQUAL(pit.size(), 0);
 
-  insertResult = pit.insert(*interest);
-  BOOST_CHECK_EQUAL(insertResult.second, true);
+  std::tie(entry, isNew) = pit.insert(*interest);
+  BOOST_CHECK_EQUAL(isNew, true);
   BOOST_CHECK_EQUAL(pit.size(), 1);
   BOOST_CHECK(pit.find(*interest) != nullptr);
 
-  insertResult = pit.insert(*interest);
-  BOOST_CHECK_EQUAL(insertResult.second, false);
+  std::tie(entry, isNew) = pit.insert(*interest);
+  BOOST_CHECK_EQUAL(isNew, false);
   BOOST_CHECK_EQUAL(pit.size(), 1);
   BOOST_CHECK(pit.find(*interest) != nullptr);
 
-  pit.erase(insertResult.first.get());
+  pit.erase(entry.get());
   BOOST_CHECK_EQUAL(pit.size(), 0);
   BOOST_CHECK(pit.find(*interest) == nullptr);
 
-  insertResult = pit.insert(*interest);
-  BOOST_CHECK_EQUAL(insertResult.second, true);
+  std::tie(entry, isNew) = pit.insert(*interest);
+  BOOST_CHECK_EQUAL(isNew, true);
   BOOST_CHECK_EQUAL(pit.size(), 1);
   BOOST_CHECK(pit.find(*interest) != nullptr);
 }
@@ -203,7 +156,7 @@
   size_t nNameTreeEntriesBefore = nameTree.size();
 
   auto interest = makeInterest("/37xWVvQ2K");
-  shared_ptr<Entry> entry = pit.insert(*interest).first;
+  auto entry = pit.insert(*interest).first;
   pit.erase(entry.get());
   BOOST_CHECK_EQUAL(nameTree.size(), nNameTreeEntriesBefore);
 }
@@ -238,11 +191,11 @@
 
 BOOST_AUTO_TEST_CASE(FindAllDataMatches)
 {
-  Name nameA   ("ndn:/A");
-  Name nameAB  ("ndn:/A/B");
-  Name nameABC ("ndn:/A/B/C");
-  Name nameABCD("ndn:/A/B/C/D");
-  Name nameD   ("ndn:/D");
+  Name nameA   ("/A");
+  Name nameAB  ("/A/B");
+  Name nameABC ("/A/B/C");
+  Name nameABCD("/A/B/C/D");
+  Name nameD   ("/D");
 
   auto interestA   = makeInterest(nameA,   true);
   auto interestABC = makeInterest(nameABC, true);
@@ -271,7 +224,7 @@
   bool hasABC = false;
   bool hasD   = false;
 
-  for (const shared_ptr<Entry>& entry : matches) {
+  for (const auto& entry : matches) {
     ++count;
 
     if (entry->getName().equals(nameA ))
@@ -307,7 +260,7 @@
   DataMatchResult matches = pit.findAllDataMatches(*data);
 
   BOOST_REQUIRE_EQUAL(std::distance(matches.begin(), matches.end()), 1);
-  shared_ptr<Entry> found = *matches.begin();
+  auto found = *matches.begin();
   BOOST_CHECK_EQUAL(found->getName(), fullName);
 }
 
@@ -333,8 +286,8 @@
   auto d3 = makeData(n3);
   auto i3 = makeInterest(d3->getFullName());
 
-  shared_ptr<Entry> entry2 = pit.insert(*i2).first;
-  shared_ptr<Entry> entry3 = pit.insert(*i3).first;
+  auto entry2 = pit.insert(*i2).first;
+  auto entry3 = pit.insert(*i3).first;
 
   BOOST_CHECK_EQUAL(pit.size(), 2);
   BOOST_CHECK_EQUAL(nameTree.size(), 1 + NameTree::getMaxDepth()); // root node + max depth
@@ -354,11 +307,11 @@
   NameTree nameTree(16);
   Pit pit(nameTree);
 
-  auto interestA    = makeInterest("/A");
+  auto interestA = makeInterest("/A");
   auto interestABC1 = makeInterest("/A/B/C");
   auto interestABC2 = makeInterest("/A/B/C");
-  interestABC2->setSelectors(ndn::Selectors().setMinSuffixComponents(10));
-  auto interestD    = makeInterest("/D");
+  interestABC2->setMustBeFresh(true);
+  auto interestD = makeInterest("/D");
 
   BOOST_CHECK_EQUAL(pit.size(), 0);
   BOOST_CHECK(pit.begin() == pit.end());
@@ -379,16 +332,13 @@
   pit.insert(*interestABC2);
   pit.insert(*interestD);
 
-  std::set<const Interest*> expected = {&*interestA, &*interestABC1, &*interestABC2, &*interestD};
   std::set<const Interest*> actual;
   for (const auto& pitEntry : pit) {
     actual.insert(&pitEntry.getInterest());
   }
-  BOOST_CHECK(actual == expected);
-  for (auto actualIt = actual.begin(), expectedIt = expected.begin();
-       actualIt != actual.end() && expectedIt != expected.end(); ++actualIt, ++expectedIt) {
-    BOOST_CHECK_EQUAL(**actualIt, **expectedIt);
-  }
+  std::set<const Interest*> expected = {interestA.get(), interestABC1.get(),
+                                        interestABC2.get(), interestD.get()};
+  BOOST_CHECK_EQUAL_COLLECTIONS(actual.begin(), actual.end(), expected.begin(), expected.end());
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestPit
