diff --git a/tests/tools/nfdc/face-module.t.cpp b/tests/tools/nfdc/face-module.t.cpp
index 8d33ee8..bce68b7 100644
--- a/tests/tools/nfdc/face-module.t.cpp
+++ b/tests/tools/nfdc/face-module.t.cpp
@@ -227,15 +227,15 @@
 {
 protected:
   void
-  respond409(FacePersistency persistency)
+  respond409(const Interest& interest, FacePersistency persistency)
   {
-    MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS("/localhost/nfd/faces/create");
+    MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/create");
     ControlParameters body;
     body.setFaceId(1172)
         .setUri("udp4://100.77.30.65:6363")
         .setFacePersistency(persistency)
         .setFlags(0);
-    this->failCommand(409, "conflict-409", body);
+    this->failCommand(interest, 409, "conflict-409", body);
   }
 };
 
@@ -244,7 +244,7 @@
 BOOST_AUTO_TEST_CASE(Creating)
 {
   this->processInterest = [this] (const Interest& interest) {
-    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS("/localhost/nfd/faces/create");
+    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/create");
     BOOST_REQUIRE(req.hasUri());
     BOOST_CHECK_EQUAL(req.getUri(), "udp4://159.242.33.78:6363");
     BOOST_REQUIRE(req.hasFacePersistency());
@@ -253,7 +253,7 @@
     ControlParameters resp;
     resp.setFaceId(2130)
         .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT);
-    this->succeedCommand(resp);
+    this->succeedCommand(interest, resp);
   };
 
   this->execute("face create udp://159.242.33.78");
@@ -266,12 +266,12 @@
 {
   bool hasUpdateCommand = false;
   this->processInterest = [this, &hasUpdateCommand] (const Interest& interest) {
-    if (this->getCommand("/localhost/nfd/faces/create")) {
-      this->respond409(FacePersistency::FACE_PERSISTENCY_ON_DEMAND);
+    if (parseCommand(interest, "/localhost/nfd/faces/create")) {
+      this->respond409(interest, FacePersistency::FACE_PERSISTENCY_ON_DEMAND);
       return;
     }
 
-    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS("/localhost/nfd/faces/update");
+    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update");
     hasUpdateCommand = true;
     BOOST_REQUIRE(req.hasFaceId());
     BOOST_CHECK_EQUAL(req.getFaceId(), 1172);
@@ -283,7 +283,7 @@
     resp.setFaceId(1172)
         .setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT)
         .setFlags(0);
-    this->succeedCommand(resp);
+    this->succeedCommand(interest, resp);
   };
 
   this->execute("face create udp://100.77.30.65");
@@ -296,7 +296,7 @@
 BOOST_AUTO_TEST_CASE(NotDowngradingPersistency)
 {
   this->processInterest = [this] (const Interest& interest) {
-    this->respond409(FacePersistency::FACE_PERSISTENCY_PERMANENT);
+    this->respond409(interest, FacePersistency::FACE_PERSISTENCY_PERMANENT);
     // no command other than faces/create is expected
   };
 
@@ -309,7 +309,7 @@
 BOOST_AUTO_TEST_CASE(SamePersistency)
 {
   this->processInterest = [this] (const Interest& interest) {
-    this->respond409(FacePersistency::FACE_PERSISTENCY_PERSISTENT);
+    this->respond409(interest, FacePersistency::FACE_PERSISTENCY_PERSISTENT);
     // no command other than faces/create is expected
   };
 
@@ -336,7 +336,7 @@
 
   this->processInterest = [this] (const Interest& interest) {
     // conflict with udp4://100.77.30.65:6363
-    this->respond409(FacePersistency::FACE_PERSISTENCY_ON_DEMAND);
+    this->respond409(interest, FacePersistency::FACE_PERSISTENCY_ON_DEMAND);
   };
 
   this->execute("face create udp://20.53.73.45");
@@ -348,12 +348,12 @@
 BOOST_AUTO_TEST_CASE(ErrorUpdate)
 {
   this->processInterest = [this] (const Interest& interest) {
-    if (this->getCommand("/localhost/nfd/faces/create")) {
-      this->respond409(FacePersistency::FACE_PERSISTENCY_ON_DEMAND);
+    if (parseCommand(interest, "/localhost/nfd/faces/create")) {
+      this->respond409(interest, FacePersistency::FACE_PERSISTENCY_ON_DEMAND);
       return;
     }
 
-    MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS("/localhost/nfd/faces/update");
+    MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/update");
     // no response to faces/update
   };
 
@@ -374,13 +374,13 @@
       return;
     }
 
-    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS("/localhost/nfd/faces/destroy");
+    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/destroy");
     BOOST_REQUIRE(req.hasFaceId());
     BOOST_CHECK_EQUAL(req.getFaceId(), 10156);
 
     ControlParameters resp;
     resp.setFaceId(10156);
-    this->succeedCommand(resp);
+    this->succeedCommand(interest, resp);
   };
 
   this->execute("face destroy 10156");
@@ -397,13 +397,13 @@
       return;
     }
 
-    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS("/localhost/nfd/faces/destroy");
+    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/destroy");
     BOOST_REQUIRE(req.hasFaceId());
     BOOST_CHECK_EQUAL(req.getFaceId(), 2249);
 
     ControlParameters resp;
     resp.setFaceId(2249);
-    this->succeedCommand(resp);
+    this->succeedCommand(interest, resp);
   };
 
   this->execute("face destroy tcp://32.121.182.82");
@@ -466,7 +466,7 @@
       return;
     }
 
-    MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS("/localhost/nfd/faces/destroy");
+    MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/faces/destroy");
     // no response to command
   };
 
diff --git a/tests/tools/nfdc/mock-nfd-mgmt-fixture.hpp b/tests/tools/nfdc/mock-nfd-mgmt-fixture.hpp
index 319a9f1..fd309bf 100644
--- a/tests/tools/nfdc/mock-nfd-mgmt-fixture.hpp
+++ b/tests/tools/nfdc/mock-nfd-mgmt-fixture.hpp
@@ -72,35 +72,15 @@
     return ControlParameters(interest.getName().at(expectedPrefix.size()).blockFromValue());
   }
 
-  DEPRECATED(
-  ndn::optional<ControlParameters>
-  getCommand(const Name& expectedPrefix) const)
-  {
-    if (face.sentInterests.empty()) {
-      return ndn::nullopt;
-    }
-    return parseCommand(face.sentInterests.back(), expectedPrefix);
-  }
-
-  /** \brief respond to the last command
+  /** \brief send successful response to a command Interest
    */
   void
   succeedCommand(const Interest& interest, const ControlParameters& parameters)
   {
-    ndn::nfd::ControlResponse resp(200, "OK");
-    resp.setBody(parameters.wireEncode());
-    this->sendCommandReply(interest, resp);
+    this->sendCommandReply(interest, 200, "OK", parameters.wireEncode());
   }
 
-  DEPRECATED(
-  void
-  succeedCommand(const ControlParameters& parameters))
-  {
-    this->succeedCommand(face.sentInterests.back(), parameters);
-  }
-
-  /** \brief respond to the last command
-   *  \pre last Interest is a command
+  /** \brief send failure response to a command Interest
    */
   void
   failCommand(const Interest& interest, uint32_t code, const std::string& text)
@@ -108,26 +88,14 @@
     this->sendCommandReply(interest, {code, text});
   }
 
-  DEPRECATED(
-  void
-  failCommand(uint32_t code, const std::string& text))
-  {
-    this->sendCommandReply(face.sentInterests.back(), {code, text});
-  }
-
+  /** \brief send failure response to a command Interest
+   */
   void
   failCommand(const Interest& interest, uint32_t code, const std::string& text, const ControlParameters& body)
   {
     this->sendCommandReply(interest, code, text, body.wireEncode());
   }
 
-  DEPRECATED(
-  void
-  failCommand(uint32_t code, const std::string& text, const ControlParameters& body))
-  {
-    this->failCommand(face.sentInterests.back(), code, text, body);
-  }
-
 protected: // StatusDataset
   /** \brief send an empty dataset in reply to StatusDataset request
    *  \param prefix dataset prefix without version and segment
@@ -307,6 +275,7 @@
 
 /** \brief require the command in \p interest has expected prefix
  *  \note This must be used in processInterest lambda, and the Interest must be named 'interest'.
+ *  \return ControlParameters, or nullopt if \p interest does match \p expectedPrefix
  */
 #define MOCK_NFD_MGMT_REQUIRE_COMMAND_IS(expectedPrefix) \
   [interest] { \
@@ -316,12 +285,4 @@
     return *params; \
   } ()
 
-///\deprecated use MOCK_NFD_MGMT_REQUIRE_COMMAND_IS
-#define MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS(expectedPrefix) \
-  [this] { \
-    BOOST_REQUIRE_MESSAGE(!face.sentInterests.empty(), "no Interest expressed"); \
-    const Interest& interest = face.sentInterests.back(); \
-    return MOCK_NFD_MGMT_REQUIRE_COMMAND_IS(expectedPrefix); \
-  } ()
-
 #endif // NFD_TESTS_TOOLS_NFDC_MOCK_NFD_MGMT_FIXTURE_HPP
diff --git a/tests/tools/nfdc/rib-module.t.cpp b/tests/tools/nfdc/rib-module.t.cpp
index df0a696..2cdc21d 100644
--- a/tests/tools/nfdc/rib-module.t.cpp
+++ b/tests/tools/nfdc/rib-module.t.cpp
@@ -45,7 +45,7 @@
       return;
     }
 
-    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS("/localhost/nfd/rib/register");
+    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/rib/register");
     ndn::nfd::RibRegisterCommand cmd;
     cmd.validateRequest(req);
     cmd.applyDefaultsToRequest(req);
@@ -56,7 +56,7 @@
     BOOST_CHECK_EQUAL(req.getFlags(), ndn::nfd::ROUTE_FLAGS_NONE);
     BOOST_CHECK_EQUAL(req.hasExpirationPeriod(), false);
 
-    this->succeedCommand(req);
+    this->succeedCommand(interest, req);
   };
 
   this->execute("route add /vxXoEaWeDB 10156 no-inherit");
@@ -73,7 +73,7 @@
       return;
     }
 
-    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS("/localhost/nfd/rib/register");
+    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/rib/register");
     ndn::nfd::RibRegisterCommand cmd;
     cmd.validateRequest(req);
     cmd.applyDefaultsToRequest(req);
@@ -88,7 +88,7 @@
 
     ControlParameters resp = req;
     resp.setExpirationPeriod(time::milliseconds(727411154)); // server side may change expiration
-    this->succeedCommand(resp);
+    this->succeedCommand(interest, resp);
   };
 
   this->execute("route add /FLQAsaYnYf tcp4://32.121.182.82:6363 "
@@ -152,7 +152,7 @@
       return;
     }
 
-    MOCK_NFD_MGMT_REQUIRE_LAST_COMMAND_IS("/localhost/nfd/rib/register");
+    MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/rib/register");
     // no response to command
   };
 
