diff --git a/tests/daemon/fw/asf-strategy.t.cpp b/tests/daemon/fw/asf-strategy.t.cpp
index 09013ee..14aa777 100644
--- a/tests/daemon/fw/asf-strategy.t.cpp
+++ b/tests/daemon/fw/asf-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-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -340,16 +340,14 @@
   topo.registerPrefix(nodeC, linkBC->getFace(nodeC), PRODUCER_PREFIX, 16);
   topo.registerPrefix(nodeB, linkBD->getFace(nodeB), PRODUCER_PREFIX, 80);
 
-  uint32_t nonce;
-
   // Send 6 interest since probes can be scheduled b/w 0-5 seconds
   for (int i = 1; i < 7; i++) {
     // Send ping number i
     Name name(PRODUCER_PREFIX);
     name.appendTimestamp();
-    shared_ptr<Interest> interest = makeInterest(name);
+    auto interest = makeInterest(name);
     ping->getClientFace().expressInterest(*interest, nullptr, nullptr, nullptr);
-    nonce = interest->getNonce();
+    auto nonce = interest->getNonce();
 
     // Don't know when the probe will be triggered since it is random between 0-5 seconds
     // or whether it will be triggered for this interest
@@ -360,13 +358,12 @@
     // Check if probe is sent to B else send another ping
     if (linkAB->getFace(nodeA).getCounters().nOutInterests == 1) {
       // Get pitEntry of node A
-      shared_ptr<pit::Entry> pitEntry = topo.getForwarder(nodeA).getPit().find(*interest);
-      //get outRecord associated with face towards B
-      pit::OutRecordCollection::const_iterator outRecord = pitEntry->getOutRecord(linkAB->getFace(nodeA));
+      auto pitEntry = topo.getForwarder(nodeA).getPit().find(*interest);
+      // Get outRecord associated with face towards B
+      auto outRecord = pitEntry->getOutRecord(linkAB->getFace(nodeA));
+      BOOST_REQUIRE(outRecord != pitEntry->out_end());
 
-      BOOST_CHECK(outRecord != pitEntry->out_end());
-
-      //Check that Nonce of interest is not equal to Nonce of Probe
+      // Check that Nonce of interest is not equal to Nonce of Probe
       BOOST_CHECK_NE(nonce, outRecord->getLastNonce());
 
       // B should not have received the probe interest yet
@@ -384,7 +381,6 @@
 
       // Get outRecord associated with face towards D.
       outRecord = pitEntry->getOutRecord(linkBD->getFace(nodeB));
-
       BOOST_CHECK(outRecord != pitEntry->out_end());
 
       // RTT between B and D
diff --git a/tests/daemon/table/dead-nonce-list.t.cpp b/tests/daemon/table/dead-nonce-list.t.cpp
index b98cd00..a5a537e 100644
--- a/tests/daemon/table/dead-nonce-list.t.cpp
+++ b/tests/daemon/table/dead-nonce-list.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-2020,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -39,8 +39,8 @@
 {
   Name nameA("ndn:/A");
   Name nameB("ndn:/B");
-  const uint32_t nonce1 = 0x53b4eaa8;
-  const uint32_t nonce2 = 0x1f46372b;
+  const Interest::Nonce nonce1(0x53b4eaa8);
+  const Interest::Nonce nonce2(0x1f46372b);
 
   DeadNonceList dnl;
   BOOST_CHECK_EQUAL(dnl.size(), 0);
@@ -64,13 +64,8 @@
 protected:
   PeriodicalInsertionFixture()
     : dnl(LIFETIME)
-    , name("ndn:/N")
-    , lastNonce(0)
-    , addNonceBatch(0)
-    , addNonceInterval(LIFETIME / DeadNonceList::EXPECTED_MARK_COUNT)
-    , timeUnit(addNonceInterval / 2)
   {
-    this->addNonce();
+    addNonce();
   }
 
   void
@@ -86,7 +81,7 @@
       dnl.add(name, ++lastNonce);
     }
 
-    if (addNonceInterval > time::nanoseconds::zero()) {
+    if (addNonceInterval > 0_ns) {
       addNonceEvent = getScheduler().schedule(addNonceInterval, [this] { addNonce(); });
     }
   }
@@ -96,17 +91,17 @@
   void
   advanceClocksByLifetime(float t)
   {
-    this->advanceClocks(timeUnit, time::duration_cast<time::nanoseconds>(LIFETIME * t));
+    advanceClocks(timeUnit, time::duration_cast<time::nanoseconds>(LIFETIME * t));
   }
 
 protected:
   static const time::nanoseconds LIFETIME;
   DeadNonceList dnl;
-  Name name;
-  uint32_t lastNonce;
-  size_t addNonceBatch;
-  time::nanoseconds addNonceInterval;
-  time::nanoseconds timeUnit;
+  Name name = "/N";
+  uint32_t lastNonce = 0;
+  size_t addNonceBatch = 0;
+  const time::nanoseconds addNonceInterval = LIFETIME / DeadNonceList::EXPECTED_MARK_COUNT;
+  const time::nanoseconds timeUnit = addNonceInterval / 2;
   scheduler::ScopedEventId addNonceEvent;
 };
 
@@ -121,7 +116,7 @@
   this->advanceClocksByLifetime(10.0);
 
   Name nameC("ndn:/C");
-  const uint32_t nonceC = 0x25390656;
+  const Interest::Nonce nonceC(0x25390656);
   BOOST_CHECK_EQUAL(dnl.has(nameC, nonceC), false);
   dnl.add(nameC, nonceC);
   BOOST_CHECK_EQUAL(dnl.has(nameC, nonceC), true);
