diff --git a/tests/daemon/table/pit.cpp b/tests/daemon/table/pit.cpp
index 8e73a12..dcf5053 100644
--- a/tests/daemon/table/pit.cpp
+++ b/tests/daemon/table/pit.cpp
@@ -77,7 +77,7 @@
   BOOST_CHECK_LE(in1->getExpiry() - in1->getLastRenewed()
                  - interest1->getInterestLifetime(),
                  (after1 - before1));
-  BOOST_CHECK(in1 == entry.getInRecord(face1));
+  BOOST_CHECK(in1 == entry.getInRecord(*face1));
 
   // insert OutRecord
   time::steady_clock::TimePoint before2 = time::steady_clock::now();
@@ -94,7 +94,7 @@
   BOOST_CHECK_LE(out1->getExpiry() - out1->getLastRenewed()
                  - interest1->getInterestLifetime(),
                  (after2 - before2));
-  BOOST_CHECK(out1 == entry.getOutRecord(face1));
+  BOOST_CHECK(out1 == entry.getOutRecord(*face1));
 
   // update InRecord
   time::steady_clock::TimePoint before3 = time::steady_clock::now();
@@ -118,7 +118,7 @@
   BOOST_CHECK_EQUAL(in3->getFace(), face2);
 
   // get InRecord
-  pit::InRecordCollection::const_iterator in4 = entry.getInRecord(face1);
+  pit::InRecordCollection::const_iterator in4 = entry.getInRecord(*face1);
   BOOST_REQUIRE(in4 != entry.getInRecords().end());
   BOOST_CHECK_EQUAL(in4->getFace(), face1);
 
@@ -126,7 +126,7 @@
   entry.deleteInRecords();
   const pit::InRecordCollection& inRecords5 = entry.getInRecords();
   BOOST_CHECK_EQUAL(inRecords5.size(), 0);
-  BOOST_CHECK(entry.getInRecord(face1) == entry.getInRecords().end());
+  BOOST_CHECK(entry.getInRecord(*face1) == entry.getInRecords().end());
 
   // insert another OutRecord
   pit::OutRecordCollection::iterator out2 =
@@ -136,16 +136,16 @@
   BOOST_CHECK_EQUAL(out2->getFace(), face2);
 
   // get OutRecord
-  pit::OutRecordCollection::const_iterator out3 = entry.getOutRecord(face1);
+  pit::OutRecordCollection::const_iterator out3 = entry.getOutRecord(*face1);
   BOOST_REQUIRE(out3 != entry.getOutRecords().end());
   BOOST_CHECK_EQUAL(out3->getFace(), face1);
 
   // delete OutRecord
-  entry.deleteOutRecord(face2);
+  entry.deleteOutRecord(*face2);
   const pit::OutRecordCollection& outRecords4 = entry.getOutRecords();
   BOOST_REQUIRE_EQUAL(outRecords4.size(), 1);
   BOOST_CHECK_EQUAL(outRecords4.begin()->getFace(), face1);
-  BOOST_CHECK(entry.getOutRecord(face2) == entry.getOutRecords().end());
+  BOOST_CHECK(entry.getOutRecord(*face2) == entry.getOutRecords().end());
 }
 
 BOOST_AUTO_TEST_CASE(EntryNonce)
@@ -419,17 +419,15 @@
 
   shared_ptr<Data> data = makeData(nameABCD);
 
-  shared_ptr<pit::DataMatchResult> matches = pit.findAllDataMatches(*data);
+  pit::DataMatchResult matches = pit.findAllDataMatches(*data);
 
   bool hasA   = false;
   bool hasAB  = false;
   bool hasABC = false;
   bool hasD   = false;
 
-  for (pit::DataMatchResult::iterator it = matches->begin();
-       it != matches->end(); ++it) {
+  for (const shared_ptr<pit::Entry>& entry : matches) {
     ++count;
-    shared_ptr<pit::Entry> entry = *it;
 
     if (entry->getName().equals(nameA ))
       hasA   = true;
