diff --git a/tests/publisher/test-dataset-interest-handler.cpp b/tests/publisher/test-dataset-interest-handler.cpp
index bbb37a7..7083b82 100644
--- a/tests/publisher/test-dataset-interest-handler.cpp
+++ b/tests/publisher/test-dataset-interest-handler.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2018,  The University of Memphis,
+ * Copyright (c) 2014-2019,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -33,11 +33,11 @@
 namespace nlsr {
 namespace test {
 
-void
+static void
 processDatasetInterest(ndn::util::DummyClientFace& face,
                        std::function<bool(const ndn::Block&)> isSameType)
 {
-  face.processEvents(ndn::time::milliseconds(30));
+  face.processEvents(30_ms);
 
   BOOST_REQUIRE_EQUAL(face.sentData.size(), 1);
 
@@ -86,22 +86,22 @@
   rt1.addNextHop(DEST_ROUTER, nh);
 
   // Request adjacency LSAs
-  face.receive(ndn::Interest(ndn::Name("/localhost/nlsr/lsdb").append("adjacencies")));
+  face.receive(ndn::Interest("/localhost/nlsr/lsdb/adjacencies").setCanBePrefix(true));
   processDatasetInterest(face,
     [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::AdjacencyLsa; });
 
   // Request coordinate LSAs
-  face.receive(ndn::Interest(ndn::Name("/localhost/nlsr/lsdb").append("coordinates")));
+  face.receive(ndn::Interest("/localhost/nlsr/lsdb/coordinates").setCanBePrefix(true));
   processDatasetInterest(face,
     [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::CoordinateLsa; });
 
   // Request Name LSAs
-  face.receive(ndn::Interest(ndn::Name("/localhost/nlsr/lsdb").append("names")));
+  face.receive(ndn::Interest("/localhost/nlsr/lsdb/names").setCanBePrefix(true));
   processDatasetInterest(face,
     [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::NameLsa; });
 
   // Request Routing Table
-  face.receive(ndn::Interest(ndn::Name("/localhost/nlsr/routing-table")));
+  face.receive(ndn::Interest("/localhost/nlsr/routing-table").setCanBePrefix(true));
   processDatasetInterest(face,
     [] (const ndn::Block& block) {
       return block.type() == ndn::tlv::nlsr::RoutingTable; });
@@ -138,22 +138,22 @@
   rt1.addNextHop(DEST_ROUTER, nh);
 
   // Request adjacency LSAs
-  face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/nlsr/lsdb").append("adjacencies")));
+  face.receive(ndn::Interest("/ndn/This/Router/nlsr/lsdb/adjacencies").setCanBePrefix(true));
   processDatasetInterest(face,
     [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::AdjacencyLsa; });
 
   // Request coordinate LSAs
-  face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/nlsr/lsdb").append("coordinates")));
+  face.receive(ndn::Interest("/ndn/This/Router/nlsr/lsdb/coordinates").setCanBePrefix(true));
   processDatasetInterest(face,
     [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::CoordinateLsa; });
 
   // Request Name LSAs
-  face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/nlsr/lsdb").append("names")));
+  face.receive(ndn::Interest("/ndn/This/Router/nlsr/lsdb/names").setCanBePrefix(true));
   processDatasetInterest(face,
     [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::NameLsa; });
 
   // Request Routing Table
-  face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/nlsr/routing-table")));
+  face.receive(ndn::Interest("/ndn/This/Router/nlsr/routing-table").setCanBePrefix(true));
   processDatasetInterest(face,
     [] (const ndn::Block& block) {
       return block.type() == ndn::tlv::nlsr::RoutingTable; });
diff --git a/tests/update/test-advertise-crash.cpp b/tests/update/test-advertise-crash.cpp
index db9dfe6..fd760aa 100644
--- a/tests/update/test-advertise-crash.cpp
+++ b/tests/update/test-advertise-crash.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2017,  The University of Memphis,
+ * Copyright (c) 2014-2019,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -19,9 +19,10 @@
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  **/
 
-#include "../test-common.hpp"
 #include "nlsr.hpp"
 
+#include "../test-common.hpp"
+
 namespace nlsr {
 namespace update {
 namespace test {
@@ -84,12 +85,12 @@
 
   // Advertise
   ndn::nfd::ControlParameters parameters;
-  parameters.setName("/prefix/to/advertise/");
+  parameters.setName("/prefix/to/advertise");
   ndn::Name advertiseCommand("/localhost/nlsr/prefix-update/advertise");
   advertiseCommand.append(parameters.wireEncode());
 
-  std::shared_ptr<ndn::Interest> advertiseInterest = std::make_shared<ndn::Interest>(advertiseCommand);
-
+  auto advertiseInterest = std::make_shared<ndn::Interest>(advertiseCommand);
+  advertiseInterest->setCanBePrefix(false);
   face.receive(*advertiseInterest);
   this->advanceClocks(ndn::time::milliseconds(10), 10);
 }
diff --git a/tests/update/test-nfd-rib-command-processor.cpp b/tests/update/test-nfd-rib-command-processor.cpp
index b6645d2..93a5f4d 100644
--- a/tests/update/test-nfd-rib-command-processor.cpp
+++ b/tests/update/test-nfd-rib-command-processor.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2018,  The University of Memphis,
+ * Copyright (c) 2014-2019,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -20,16 +20,12 @@
  **/
 
 #include "update/nfd-rib-command-processor.hpp"
+#include "adjacency-list.hpp"
+#include "conf-parameter.hpp"
+#include "nlsr.hpp"
 
 #include "../test-common.hpp"
 #include "../control-commands.hpp"
-#include "conf-parameter.hpp"
-#include "adjacency-list.hpp"
-#include "nlsr.hpp"
-
-#include <ndn-cxx/interest.hpp>
-#include <ndn-cxx/util/dummy-client-face.hpp>
-#include <ndn-cxx/security/key-chain.hpp>
 
 namespace nlsr {
 namespace update {
@@ -59,17 +55,18 @@
     nameLsaSeqNoBeforeInterest = nlsr.getLsdb().getSequencingManager().getNameLsaSeq();
   }
 
-  std::shared_ptr<ndn::Interest>
-  makeInterest(const ndn::Name& name, uint32_t nonce)
+  void
+  sendCommand(ndn::Name prefix, const ndn::nfd::ControlParameters& parameters)
   {
-    auto interest = std::make_shared<ndn::Interest>(name);
-    if (nonce != 0) {
-      interest->setNonce(nonce);
-    }
-    return interest;
+    ndn::Interest interest(prefix.append(parameters.wireEncode()));
+    interest.setCanBePrefix(false);
+    face.receive(interest);
+    this->advanceClocks(ndn::time::milliseconds(10), 10);
   }
 
-  void sendInterestForPublishedData() {
+  void
+  sendInterestForPublishedData()
+  {
     // Need to send an interest now since ChronoSync
     // no longer does face->put(*data) in publishData.
     // Instead it does it in onInterest
@@ -77,8 +74,8 @@
     lsaInterestName.append(std::to_string(Lsa::Type::NAME));
 
     lsaInterestName.appendNumber(nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
-    shared_ptr<ndn::Interest> lsaInterest = make_shared<ndn::Interest>(lsaInterestName);
-
+    auto lsaInterest = make_shared<ndn::Interest>(lsaInterestName);
+    lsaInterest->setCanBePrefix(true);
     face.receive(*lsaInterest);
     this->advanceClocks(ndn::time::milliseconds(10), 10);
   }
@@ -139,12 +136,9 @@
   ndn::Name name("/localhost/nlsr/rib/register");
   ndn::Name prefixName("/test/prefixA");
   ndn::nfd::ControlParameters parameters;
+  parameters.setName(prefixName);
 
-  shared_ptr<ndn::Interest> command = makeInterest(name.append(parameters.setName(prefixName)
-    .wireEncode()), 0);
-
-  face.receive(*command);
-  this->advanceClocks(ndn::time::milliseconds(10), 10);
+  sendCommand(name, parameters);
 
   BOOST_CHECK_EQUAL(namePrefixes.getNames().size(), 1);
   std::list<ndn::Name> names = namePrefixes.getNames();
@@ -162,14 +156,11 @@
   ndn::Name name("/localhost/nlsr/rib/unregister");
   ndn::Name prefixName("/test/prefixA");
   ndn::nfd::ControlParameters parameters;
+  parameters.setName(prefixName);
 
   namePrefixes.insert(prefixName);
 
-  shared_ptr<ndn::Interest> command = makeInterest(name.append(parameters.setName(prefixName)
-    .wireEncode()), 0);
-
-  face.receive(ndn::Interest(name));
-  this->advanceClocks(ndn::time::milliseconds(10), 10);
+  sendCommand(name, parameters);
 
   BOOST_CHECK_EQUAL(namePrefixes.getNames().size(), 0);
   BOOST_CHECK(wasRoutingUpdatePublished());
@@ -181,12 +172,9 @@
   ndn::Name name("/localhost/invalid/rib/register");
   ndn::Name prefixName("/test/prefixA");
   ndn::nfd::ControlParameters parameters;
+  parameters.setName(prefixName);
 
-  shared_ptr<ndn::Interest> command = makeInterest(name.append(parameters.setName(prefixName)
-    .wireEncode()), 0);
-
-  face.receive(ndn::Interest(name));
-  this->advanceClocks(ndn::time::milliseconds(10), 10);
+  sendCommand(name, parameters);
 
   BOOST_CHECK_EQUAL(namePrefixes.getNames().size(), 0);
 
diff --git a/tests/update/test-prefix-update-processor.cpp b/tests/update/test-prefix-update-processor.cpp
index c4bbaa7..4713eb3 100644
--- a/tests/update/test-prefix-update-processor.cpp
+++ b/tests/update/test-prefix-update-processor.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2018,  The University of Memphis,
+ * Copyright (c) 2014-2019,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -20,20 +20,15 @@
  **/
 
 #include "update/prefix-update-processor.hpp"
+#include "nlsr.hpp"
 
 #include "../control-commands.hpp"
 #include "../test-common.hpp"
-#include "nlsr.hpp"
 
-#include <ndn-cxx/interest.hpp>
-#include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
 #include <ndn-cxx/mgmt/nfd/control-response.hpp>
-#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/security/command-interest-signer.hpp>
 #include <ndn-cxx/security/pib/identity.hpp>
 #include <ndn-cxx/security/signing-helpers.hpp>
-#include <ndn-cxx/security/command-interest-signer.hpp>
-#include <ndn-cxx/util/dummy-client-face.hpp>
-#include <ndn-cxx/lp/tags.hpp>
 
 #include <boost/filesystem.hpp>
 
@@ -142,8 +137,8 @@
 
     lsaInterestName.appendNumber(nlsr.getLsdb().getSequencingManager().getNameLsaSeq());
 
-    std::shared_ptr<Interest> lsaInterest = std::make_shared<Interest>(lsaInterestName);
-
+    auto lsaInterest = std::make_shared<Interest>(lsaInterestName);
+    lsaInterest->setCanBePrefix(true);
     face.receive(*lsaInterest);
     this->advanceClocks(ndn::time::milliseconds(100));
   }
diff --git a/tests/update/test-save-delete-prefix.cpp b/tests/update/test-save-delete-prefix.cpp
index 7bbe06e..f3145e3 100644
--- a/tests/update/test-save-delete-prefix.cpp
+++ b/tests/update/test-save-delete-prefix.cpp
@@ -20,18 +20,16 @@
  **/
 
 #include "update/prefix-update-processor.hpp"
-#include "../control-commands.hpp"
-#include "../test-common.hpp"
 #include "nlsr.hpp"
 
-#include <ndn-cxx/interest.hpp>
-#include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
+#include "../control-commands.hpp"
+#include "../test-common.hpp"
+
 #include <ndn-cxx/mgmt/nfd/control-response.hpp>
-#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/security/command-interest-signer.hpp>
 #include <ndn-cxx/security/pib/identity.hpp>
 #include <ndn-cxx/security/signing-helpers.hpp>
-#include <ndn-cxx/security/command-interest-signer.hpp>
-#include <ndn-cxx/util/dummy-client-face.hpp>
+
 #include <boost/filesystem.hpp>
 
 namespace nlsr {
@@ -146,20 +144,16 @@
     }
     ndn::Name advertiseCommand("/localhost/nlsr/prefix-update/advertise");
     ndn::Name withdrawCommand("/localhost/nlsr/prefix-update/withdraw");
-    ndn:: Interest interestName;
     ndn::security::CommandInterestSigner cis(m_keyChain);
     // type true for advertise, else withdraw
     if (type == "advertise") {
       advertiseCommand.append(parameters.wireEncode());
-      interestName = cis.makeCommandInterest(advertiseCommand,
-                                             ndn::security::signingByIdentity(opIdentity));
+      return cis.makeCommandInterest(advertiseCommand, ndn::security::signingByIdentity(opIdentity));
     }
     else {
       withdrawCommand.append(parameters.wireEncode());
-      interestName = cis.makeCommandInterest(withdrawCommand,
-                                             ndn::security::signingByIdentity(opIdentity));
+      return cis.makeCommandInterest(withdrawCommand, ndn::security::signingByIdentity(opIdentity));
     }
-    return interestName;
   }
 
 public:
