diff --git a/tests/core/notification-stream.cpp b/tests/core/notification-stream.cpp
index df3fc5b..e231427 100644
--- a/tests/core/notification-stream.cpp
+++ b/tests/core/notification-stream.cpp
@@ -27,8 +27,7 @@
 #include "simple-notification.hpp"
 
 #include "tests/test-common.hpp"
-#include "tests/dummy-client-face.hpp"
-
+#include <ndn-cxx/util/dummy-client-face.hpp>
 
 namespace nfd {
 namespace tests {
@@ -37,29 +36,29 @@
 
 BOOST_AUTO_TEST_CASE(Post)
 {
-  shared_ptr<DummyClientFace> face = makeDummyClientFace();
+  shared_ptr<ndn::util::DummyClientFace> face = ndn::util::makeDummyClientFace();
   ndn::KeyChain keyChain;
-  NotificationStream<DummyClientFace> notificationStream(*face,
+  NotificationStream<ndn::util::DummyClientFace> notificationStream(*face,
     "/localhost/nfd/NotificationStreamTest", keyChain);
 
   SimpleNotification event1("msg1");
   notificationStream.postNotification(event1);
   face->processEvents();
-  BOOST_REQUIRE_EQUAL(face->m_sentDatas.size(), 1);
-  BOOST_CHECK_EQUAL(face->m_sentDatas[0].getName(),
+  BOOST_REQUIRE_EQUAL(face->sentDatas.size(), 1);
+  BOOST_CHECK_EQUAL(face->sentDatas[0].getName(),
                     "/localhost/nfd/NotificationStreamTest/%FE%00");
   SimpleNotification decoded1;
-  BOOST_CHECK_NO_THROW(decoded1.wireDecode(face->m_sentDatas[0].getContent().blockFromValue()));
+  BOOST_CHECK_NO_THROW(decoded1.wireDecode(face->sentDatas[0].getContent().blockFromValue()));
   BOOST_CHECK_EQUAL(decoded1.getMessage(), "msg1");
 
   SimpleNotification event2("msg2");
   notificationStream.postNotification(event2);
   face->processEvents();
-  BOOST_REQUIRE_EQUAL(face->m_sentDatas.size(), 2);
-  BOOST_CHECK_EQUAL(face->m_sentDatas[1].getName(),
+  BOOST_REQUIRE_EQUAL(face->sentDatas.size(), 2);
+  BOOST_CHECK_EQUAL(face->sentDatas[1].getName(),
                     "/localhost/nfd/NotificationStreamTest/%FE%01");
   SimpleNotification decoded2;
-  BOOST_CHECK_NO_THROW(decoded2.wireDecode(face->m_sentDatas[1].getContent().blockFromValue()));
+  BOOST_CHECK_NO_THROW(decoded2.wireDecode(face->sentDatas[1].getContent().blockFromValue()));
   BOOST_CHECK_EQUAL(decoded2.getMessage(), "msg2");
 }
 
diff --git a/tests/core/segment-publisher.cpp b/tests/core/segment-publisher.cpp
index 08fc226..565c314 100644
--- a/tests/core/segment-publisher.cpp
+++ b/tests/core/segment-publisher.cpp
@@ -24,13 +24,10 @@
  */
 
 #include "core/segment-publisher.hpp"
-
-#include "tests/test-common.hpp"
-#include "tests/dummy-client-face.hpp"
-
 #include <ndn-cxx/encoding/tlv.hpp>
 
-#include <boost/foreach.hpp>
+#include "tests/test-common.hpp"
+#include <ndn-cxx/util/dummy-client-face.hpp>
 
 namespace nfd {
 namespace tests {
@@ -38,10 +35,10 @@
 NFD_LOG_INIT("SegmentPublisherTest");
 
 template<int64_t N=10000>
-class TestSegmentPublisher : public SegmentPublisher<DummyClientFace>
+class TestSegmentPublisher : public SegmentPublisher<ndn::util::DummyClientFace>
 {
 public:
-  TestSegmentPublisher(DummyClientFace& face,
+  TestSegmentPublisher(ndn::util::DummyClientFace& face,
                        const Name& prefix,
                        ndn::KeyChain& keyChain)
     : SegmentPublisher(face, prefix, keyChain)
@@ -90,7 +87,7 @@
 {
 public:
   SegmentPublisherFixture()
-    : m_face(makeDummyClientFace())
+    : m_face(ndn::util::makeDummyClientFace())
     , m_publisher(*m_face, "/localhost/nfd/SegmentPublisherFixture", m_keyChain)
   {
   }
@@ -134,7 +131,7 @@
   }
 
 protected:
-  shared_ptr<DummyClientFace> m_face;
+  shared_ptr<ndn::util::DummyClientFace> m_face;
   TestSegmentPublisher<N> m_publisher;
   ndn::EncodingBuffer m_buffer;
   ndn::KeyChain m_keyChain;
@@ -151,13 +148,13 @@
   this->m_face->processEvents();
 
   size_t nSegments = this->m_publisher.getTotalPayloadLength() /
-                       this->m_publisher.getMaxSegmentSize();
+                     this->m_publisher.getMaxSegmentSize();
   if (this->m_publisher.getTotalPayloadLength() % this->m_publisher.getMaxSegmentSize() != 0 ||
       nSegments == 0)
     ++nSegments;
 
-  BOOST_CHECK_EQUAL(this->m_face->m_sentDatas.size(), nSegments);
-  BOOST_FOREACH(const Data& data, this->m_face->m_sentDatas) {
+  BOOST_CHECK_EQUAL(this->m_face->sentDatas.size(), nSegments);
+  for (const Data& data : this->m_face->sentDatas) {
     this->validate(data);
   }
 }
diff --git a/tests/dummy-client-face.hpp b/tests/dummy-client-face.hpp
deleted file mode 100644
index 2e8781d..0000000
--- a/tests/dummy-client-face.hpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NFD_TESTS_DUMMY_CLIENT_FACE_HPP
-#define NFD_TESTS_DUMMY_CLIENT_FACE_HPP
-
-#include <ndn-cxx/face.hpp>
-#include <ndn-cxx/transport/transport.hpp>
-
-namespace nfd {
-namespace tests {
-
-class DummyClientTransport : public ndn::Transport
-{
-public:
-  void
-  receive(const Block& block)
-  {
-    if (static_cast<bool>(m_receiveCallback))
-      m_receiveCallback(block);
-  }
-
-  virtual void
-  close()
-  {
-  }
-
-  virtual void
-  pause()
-  {
-  }
-
-  virtual void
-  resume()
-  {
-  }
-
-  virtual void
-  send(const Block& wire)
-  {
-    if (wire.type() == tlv::Interest) {
-      m_sentInterests->push_back(Interest(wire));
-    }
-    else if (wire.type() == tlv::Data) {
-      m_sentDatas->push_back(Data(wire));
-    }
-  }
-
-  virtual void
-  send(const Block& header, const Block& payload)
-  {
-    this->send(payload);
-  }
-
-public:
-  std::vector<Interest>* m_sentInterests;
-  std::vector<Data>*     m_sentDatas;
-};
-
-
-/** \brief a client-side face for unit testing
- */
-class DummyClientFace : public ndn::Face
-{
-public:
-  explicit
-  DummyClientFace(shared_ptr<DummyClientTransport> transport)
-    : Face(transport)
-    , m_transport(transport)
-  {
-    m_transport->m_sentInterests = &m_sentInterests;
-    m_transport->m_sentDatas     = &m_sentDatas;
-  }
-
-  /** \brief cause the Face to receive a packet
-   */
-  template<typename Packet>
-  void
-  receive(const Packet& packet)
-  {
-    m_transport->receive(packet.wireEncode());
-  }
-
-public:
-  /** \brief sent Interests
-   *  \note After .expressInterest, .processEvents must be called before
-   *        the Interest would show up here.
-   */
-  std::vector<Interest> m_sentInterests;
-  /** \brief sent Datas
-   *  \note After .put, .processEvents must be called before
-   *        the Interest would show up here.
-   */
-  std::vector<Data>     m_sentDatas;
-
-private:
-  shared_ptr<DummyClientTransport> m_transport;
-};
-
-inline shared_ptr<DummyClientFace>
-makeDummyClientFace()
-{
-  return make_shared<DummyClientFace>(make_shared<DummyClientTransport>());
-}
-
-} // namespace tests
-} // namespace nfd
-
-#endif // NFD_TESTS_DUMMY_CLIENT_FACE_HPP
diff --git a/tests/rib/rib-manager.cpp b/tests/rib/rib-manager.cpp
index b47e3ab..afef2f3 100644
--- a/tests/rib/rib-manager.cpp
+++ b/tests/rib/rib-manager.cpp
@@ -24,14 +24,12 @@
  */
 
 #include "rib/rib-manager.hpp"
-
-#include "tests/test-common.hpp"
-#include "tests/dummy-client-face.hpp"
-#include "tests/limited-io.hpp"
-
+#include <ndn-cxx/management/nfd-face-status.hpp>
 #include "rib/rib-status-publisher-common.hpp"
 
-#include <ndn-cxx/management/nfd-face-status.hpp>
+#include "tests/test-common.hpp"
+#include "tests/limited-io.hpp"
+#include <ndn-cxx/util/dummy-client-face.hpp>
 
 namespace nfd {
 namespace rib {
@@ -45,13 +43,13 @@
     , ADD_NEXTHOP_VERB("add-nexthop")
     , REMOVE_NEXTHOP_VERB("remove-nexthop")
   {
-    face = nfd::tests::makeDummyClientFace();
+    face = ndn::util::makeDummyClientFace();
 
     manager = make_shared<RibManager>(ndn::ref(*face));
     manager->registerWithNfd();
 
     face->processEvents(time::milliseconds(1));
-    face->m_sentInterests.clear();
+    face->sentInterests.clear();
   }
 
   ~RibManagerFixture()
@@ -83,7 +81,7 @@
 
 public:
   shared_ptr<RibManager> manager;
-  shared_ptr<nfd::tests::DummyClientFace> face;
+  shared_ptr<ndn::util::DummyClientFace> face;
 
   const Name COMMAND_PREFIX;
   const Name::Component ADD_NEXTHOP_VERB;
@@ -133,7 +131,7 @@
 
   receiveCommandInterest(commandName, parameters);
 
-  BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face->sentInterests.size(), 1);
 }
 
 BOOST_FIXTURE_TEST_CASE(Register, AuthorizedRibManager)
@@ -151,9 +149,9 @@
 
   receiveCommandInterest(commandName, parameters);
 
-  BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face->sentInterests.size(), 1);
 
-  Interest& request = face->m_sentInterests[0];
+  Interest& request = face->sentInterests[0];
 
   ControlParameters extractedParameters;
   Name::Component verb;
@@ -179,7 +177,7 @@
   Name registerName("/localhost/nfd/rib/register");
 
   receiveCommandInterest(registerName, addParameters);
-  face->m_sentInterests.clear();
+  face->sentInterests.clear();
 
   ControlParameters removeParameters;
   removeParameters
@@ -191,9 +189,9 @@
 
   receiveCommandInterest(unregisterName, removeParameters);
 
-  BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face->sentInterests.size(), 1);
 
-  Interest& request = face->m_sentInterests[0];
+  Interest& request = face->sentInterests[0];
 
   ControlParameters extractedParameters;
   Name::Component verb;
@@ -217,11 +215,11 @@
 
   Name commandName("/localhost/nfd/rib/register");
 
-  BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 0);
+  BOOST_REQUIRE_EQUAL(face->sentInterests.size(), 0);
 
   receiveCommandInterest(commandName, parameters);
 
-  BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 0);
+  BOOST_REQUIRE_EQUAL(face->sentInterests.size(), 0);
 }
 
 BOOST_FIXTURE_TEST_CASE(RibStatusRequest, AuthorizedRibManager)
@@ -244,17 +242,17 @@
 
   Name commandName("/localhost/nfd/rib/register");
 
-  BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 0);
+  BOOST_REQUIRE_EQUAL(face->sentInterests.size(), 0);
 
   receiveCommandInterest(commandName, parameters);
-  face->m_sentInterests.clear();
-  face->m_sentDatas.clear();
+  face->sentInterests.clear();
+  face->sentDatas.clear();
 
   face->receive(Interest("/localhost/nfd/rib/list"));
   face->processEvents(time::milliseconds(1));
 
-  BOOST_REQUIRE_EQUAL(face->m_sentDatas.size(), 1);
-  RibStatusPublisherFixture::decodeRibEntryBlock(face->m_sentDatas[0], name, entry);
+  BOOST_REQUIRE_EQUAL(face->sentDatas.size(), 1);
+  RibStatusPublisherFixture::decodeRibEntryBlock(face->sentDatas[0], name, entry);
 }
 
 BOOST_FIXTURE_TEST_CASE(CancelExpirationEvent, AuthorizedRibManager)
@@ -272,7 +270,7 @@
   Name registerName("/localhost/nfd/rib/register");
 
   receiveCommandInterest(registerName, addParameters);
-  face->m_sentInterests.clear();
+  face->sentInterests.clear();
 
   // Unregister face
   ControlParameters removeParameters;
diff --git a/tests/rib/rib-status-publisher.cpp b/tests/rib/rib-status-publisher.cpp
index 5253bba..b1414cc 100644
--- a/tests/rib/rib-status-publisher.cpp
+++ b/tests/rib/rib-status-publisher.cpp
@@ -24,9 +24,10 @@
  */
 
 #include "rib/rib-status-publisher.hpp"
-
 #include "rib-status-publisher-common.hpp"
-#include "tests/dummy-client-face.hpp"
+
+#include "tests/test-common.hpp"
+#include <ndn-cxx/util/dummy-client-face.hpp>
 
 namespace nfd {
 namespace rib {
@@ -47,14 +48,14 @@
   rib.insert(name, entry);
 
   ndn::KeyChain keyChain;
-  shared_ptr<nfd::tests::DummyClientFace> face = nfd::tests::makeDummyClientFace();
+  shared_ptr<ndn::util::DummyClientFace> face = ndn::util::makeDummyClientFace();
   RibStatusPublisher publisher(rib, *face, "/localhost/nfd/rib/list", keyChain);
 
   publisher.publish();
   face->processEvents(time::milliseconds(1));
 
-  BOOST_REQUIRE_EQUAL(face->m_sentDatas.size(), 1);
-  decodeRibEntryBlock(face->m_sentDatas[0], name, entry);
+  BOOST_REQUIRE_EQUAL(face->sentDatas.size(), 1);
+  decodeRibEntryBlock(face->sentDatas[0], name, entry);
 }
 
 
