diff --git a/tests/daemon/mgmt/face-query-status-publisher.t.cpp b/tests/daemon/mgmt/face-query-status-publisher.t.cpp
new file mode 100644
index 0000000..076c384
--- /dev/null
+++ b/tests/daemon/mgmt/face-query-status-publisher.t.cpp
@@ -0,0 +1,131 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  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/>.
+ */
+
+#include "face-query-status-publisher-common.hpp"
+
+namespace nfd {
+namespace tests {
+
+NFD_LOG_INIT("FaceQueryStatusPublisherTest");
+
+BOOST_FIXTURE_TEST_SUITE(MgmtFaceQueryStatusPublisher, FaceQueryStatusPublisherFixture)
+
+BOOST_AUTO_TEST_CASE(NoConditionFilter)
+{
+  // filter without conditions matches all faces
+  ndn::nfd::FaceQueryFilter filter;
+  FaceQueryStatusPublisher faceQueryStatusPublisher(m_table, *m_face,
+                                                    "/localhost/nfd/FaceStatusPublisherFixture",
+                                                    filter, m_keyChain);
+
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyFace), true);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyLocalFace), true);
+}
+
+BOOST_AUTO_TEST_CASE(AllConditionFilter)
+{
+  ndn::nfd::FaceQueryFilter filter;
+  filter.setUriScheme("dummy")
+        .setRemoteUri("dummy://")
+        .setLocalUri("dummy://")
+        .setFaceScope(ndn::nfd::FACE_SCOPE_NON_LOCAL)
+        .setFacePersistency(ndn::nfd::FACE_PERSISTENCY_PERSISTENT)
+        .setLinkType(ndn::nfd::LINK_TYPE_POINT_TO_POINT);
+
+  FaceQueryStatusPublisher faceQueryStatusPublisher(m_table, *m_face,
+                                                    "/localhost/nfd/FaceStatusPublisherFixture",
+                                                    filter, m_keyChain);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyFace), true);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyLocalFace), false);
+}
+
+BOOST_AUTO_TEST_CASE(UriSchemeFilter)
+{
+  ndn::nfd::FaceQueryFilter filter;
+  filter.setUriScheme("dummyurischeme");
+  FaceQueryStatusPublisher faceQueryStatusPublisher(m_table, *m_face,
+                                                    "/localhost/nfd/FaceStatusPublisherFixture",
+                                                    filter, m_keyChain);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyFace), false);
+  auto dummyUriScheme = make_shared<DummyFace>("dummyurischeme://", "dummyurischeme://");
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(dummyUriScheme), true);
+}
+
+BOOST_AUTO_TEST_CASE(RemoteUriFilter)
+{
+  ndn::nfd::FaceQueryFilter filter;
+  filter.setRemoteUri("dummy://remoteUri");
+  FaceQueryStatusPublisher faceQueryStatusPublisher(m_table, *m_face,
+                                                    "/localhost/nfd/FaceStatusPublisherFixture",
+                                                    filter, m_keyChain);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyFace), false);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyUri), true);
+}
+
+BOOST_AUTO_TEST_CASE(LocalUriFilter)
+{
+  ndn::nfd::FaceQueryFilter filter;
+  filter.setLocalUri("dummy://localUri");
+  FaceQueryStatusPublisher faceQueryStatusPublisher(m_table, *m_face,
+                                                    "/localhost/nfd/FaceStatusPublisherFixture",
+                                                    filter, m_keyChain);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyFace), false);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyUri), true);
+}
+
+
+BOOST_AUTO_TEST_CASE(LinkTypeFilter)
+{
+  shared_ptr<MulticastUdpFace> multicastFace = m_factory.createMulticastFace("0.0.0.0",
+                                                                             "224.0.0.1",
+                                                                             "20070");
+  ndn::nfd::FaceQueryFilter filter;
+  filter.setLinkType(ndn::nfd::LINK_TYPE_MULTI_ACCESS);
+  FaceQueryStatusPublisher faceQueryStatusPublisher(m_table, *m_face,
+                                                    "/localhost/nfd/FaceStatusPublisherFixture",
+                                                    filter, m_keyChain);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyFace), false);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(multicastFace), true);
+}
+
+BOOST_AUTO_TEST_CASE(PersistencyFilter)
+{
+  shared_ptr<MulticastUdpFace> multicastFace = m_factory.createMulticastFace("0.0.0.0",
+                                                                             "224.0.0.1",
+                                                                             "20070");
+  ndn::nfd::FaceQueryFilter filter;
+  filter.setFacePersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
+  FaceQueryStatusPublisher faceQueryStatusPublisher(m_table, *m_face,
+                                                    "/localhost/nfd/FaceStatusPublisherFixture",
+                                                    filter, m_keyChain);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(m_dummyFace), false);
+  multicastFace->setOnDemand(true);
+  BOOST_CHECK_EQUAL(faceQueryStatusPublisher.doesMatchFilter(multicastFace), true);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace nfd
