tests: fix ndndump unit tests with latest ndn-cxx

Change-Id: Ib2a149266644cb40780e1c34b9885c70d31829b2
diff --git a/tests/test-common.cpp b/tests/test-common.cpp
index f180a5e..e1b2431 100644
--- a/tests/test-common.cpp
+++ b/tests/test-common.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  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,
@@ -24,6 +24,7 @@
  */
 
 #include "test-common.hpp"
+
 #include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
 
 namespace ndn {
@@ -75,13 +76,12 @@
 }
 
 shared_ptr<Interest>
-makeInterest(const Name& name, bool canBePrefix, time::milliseconds lifetime, uint32_t nonce)
+makeInterest(const Name& name, bool canBePrefix, time::milliseconds lifetime,
+             optional<Interest::Nonce> nonce)
 {
   auto interest = make_shared<Interest>(name, lifetime);
   interest->setCanBePrefix(canBePrefix);
-  if (nonce != 0) {
-    interest->setNonce(nonce);
-  }
+  interest->setNonce(nonce);
   return interest;
 }
 
@@ -103,9 +103,9 @@
 }
 
 lp::Nack
-makeNack(const Interest& interest, lp::NackReason reason)
+makeNack(Interest interest, lp::NackReason reason)
 {
-  lp::Nack nack(interest);
+  lp::Nack nack(std::move(interest));
   nack.setReason(reason);
   return nack;
 }