diff --git a/tests/mgmt/face-flags.cpp b/tests/mgmt/face-flags.cpp
new file mode 100644
index 0000000..00e4c8b
--- /dev/null
+++ b/tests/mgmt/face-flags.cpp
@@ -0,0 +1,47 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (C) 2014 Named Data Networking Project
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "mgmt/face-flags.hpp"
+
+#include "tests/test-common.hpp"
+#include "tests/face/dummy-face.hpp"
+
+namespace nfd {
+namespace tests {
+
+BOOST_FIXTURE_TEST_SUITE(MgmtFaceFlags, BaseFixture)
+
+template<typename DummyFaceBase>
+class DummyOnDemandFace : public DummyFaceBase
+{
+public:
+  DummyOnDemandFace()
+  {
+    this->setOnDemand(true);
+  }
+};
+
+BOOST_AUTO_TEST_CASE(Get)
+{
+  DummyFace face1;
+  BOOST_CHECK_EQUAL(getFaceFlags(face1), 0);
+
+  DummyLocalFace face2;
+  BOOST_CHECK_EQUAL(getFaceFlags(face2), static_cast<uint64_t>(ndn::nfd::FACE_IS_LOCAL));
+
+  DummyOnDemandFace<DummyFace> face3;
+  BOOST_CHECK_EQUAL(getFaceFlags(face3), static_cast<uint64_t>(ndn::nfd::FACE_IS_ON_DEMAND));
+
+  DummyOnDemandFace<DummyLocalFace> face4;
+  BOOST_CHECK_EQUAL(getFaceFlags(face4), static_cast<uint64_t>(ndn::nfd::FACE_IS_LOCAL |
+                                         ndn::nfd::FACE_IS_ON_DEMAND));
+
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace nfd
diff --git a/tests/mgmt/face-manager.cpp b/tests/mgmt/face-manager.cpp
index 1c3734d..4d6830c 100644
--- a/tests/mgmt/face-manager.cpp
+++ b/tests/mgmt/face-manager.cpp
@@ -1323,9 +1323,10 @@
 
     ndn::nfd::FaceEventNotification notification(wire);
 
+    BOOST_CHECK_EQUAL(notification.getKind(), expectedFaceEvent.getKind());
     BOOST_CHECK_EQUAL(notification.getFaceId(), expectedFaceEvent.getFaceId());
-    BOOST_CHECK_EQUAL(notification.getUri(), expectedFaceEvent.getUri());
-    BOOST_CHECK_EQUAL(notification.getEventKind(), expectedFaceEvent.getEventKind());
+    BOOST_CHECK_EQUAL(notification.getRemoteUri(), expectedFaceEvent.getRemoteUri());
+    BOOST_CHECK_EQUAL(notification.getLocalUri(), expectedFaceEvent.getLocalUri());
   }
 
   bool
@@ -1428,10 +1429,12 @@
 
   shared_ptr<DummyFace> dummy(make_shared<DummyFace>());
 
-  ndn::nfd::FaceEventNotification expectedFaceEvent(ndn::nfd::FACE_EVENT_CREATED,
-                                                    1,
-                                                    dummy->getUri().toString(),
-                                                    0);
+  ndn::nfd::FaceEventNotification expectedFaceEvent;
+  expectedFaceEvent.setKind(ndn::nfd::FACE_EVENT_CREATED)
+                   .setFaceId(1)
+                   .setRemoteUri(dummy->getRemoteUri().toString())
+                   .setLocalUri(dummy->getLocalUri().toString())
+                   .setFlags(0);
 
   Block encodedResultParameters(resultParameters.wireEncode());
 
@@ -1488,9 +1491,12 @@
   shared_ptr<Interest> command(make_shared<Interest>(commandName));
   generateCommand(*command);
 
-  ndn::nfd::FaceEventNotification expectedFaceEvent(ndn::nfd::FACE_EVENT_DESTROYED,
-                                                    dummy->getId(),
-                                                    dummy->getUri().toString(), 0);
+  ndn::nfd::FaceEventNotification expectedFaceEvent;
+  expectedFaceEvent.setKind(ndn::nfd::FACE_EVENT_DESTROYED)
+                   .setFaceId(dummy->getId())
+                   .setRemoteUri(dummy->getRemoteUri().toString())
+                   .setLocalUri(dummy->getLocalUri().toString())
+                   .setFlags(0);
 
   getFace()->onReceiveData +=
     bind(&FaceFixture::callbackDispatch, this, _1,
diff --git a/tests/mgmt/face-status-publisher-common.hpp b/tests/mgmt/face-status-publisher-common.hpp
index 59e99f8..2e7ec55 100644
--- a/tests/mgmt/face-status-publisher-common.hpp
+++ b/tests/mgmt/face-status-publisher-common.hpp
@@ -10,12 +10,13 @@
 #include "mgmt/face-status-publisher.hpp"
 #include "mgmt/app-face.hpp"
 #include "mgmt/internal-face.hpp"
+#include "mgmt/face-flags.hpp"
 #include "fw/forwarder.hpp"
-#include "../face/dummy-face.hpp"
 
 #include "tests/test-common.hpp"
+#include "tests/face/dummy-face.hpp"
 
-#include <ndn-cpp-dev/encoding/tlv.hpp>
+#include <ndn-cpp-dev/management/nfd-face-status.hpp>
 
 namespace nfd {
 namespace tests {
@@ -34,16 +35,16 @@
   }
 
   void
-  setCounters(FaceCounter inInterest,
-              FaceCounter inData,
-              FaceCounter outInterest,
-              FaceCounter outData)
+  setCounters(FaceCounter nInInterests,
+              FaceCounter nInDatas,
+              FaceCounter nOutInterests,
+              FaceCounter nOutDatas)
   {
     FaceCounters& counters = getMutableCounters();
-    counters.getInInterest() = inInterest;
-    counters.getInData() = inData;
-    counters.getOutInterest() = outInterest;
-    counters.getOutData() = outData;
+    counters.getNInInterests()  = nInInterests;
+    counters.getNInDatas()      = nInDatas;
+    counters.getNOutInterests() = nOutInterests;
+    counters.getNOutDatas()     = nOutDatas;
   }
 
 
@@ -102,66 +103,20 @@
   }
 
   void
-  validateFaceStatus(const Block& status, const shared_ptr<Face>& reference)
+  validateFaceStatus(const Block& statusBlock, const shared_ptr<Face>& reference)
   {
+    ndn::nfd::FaceStatus status;
+    BOOST_REQUIRE_NO_THROW(status.wireDecode(statusBlock));
     const FaceCounters& counters = reference->getCounters();
 
-    FaceId faceId = INVALID_FACEID;
-    std::string uri;
-    FaceCounter inInterest = 0;
-    FaceCounter inData = 0;
-    FaceCounter outInterest = 0;
-    FaceCounter outData = 0;
-
-    status.parse();
-
-    for (Block::element_const_iterator i = status.elements_begin();
-         i != status.elements_end();
-         ++i)
-      {
-        // parse a full set of FaceStatus sub-blocks
-        faceId =
-          checkedReadNonNegativeIntegerType(i,
-                                            status.elements_end(),
-                                            ndn::tlv::nfd::FaceId);
-
-        BOOST_REQUIRE_EQUAL(faceId, reference->getId());
-
-        BOOST_REQUIRE(i->type() == ndn::tlv::nfd::Uri);
-
-        uri.append(reinterpret_cast<const char*>(i->value()), i->value_size());
-        ++i;
-
-        BOOST_REQUIRE(i != status.elements_end());
-
-        BOOST_REQUIRE_EQUAL(uri, reference->getUri().toString());
-
-        inInterest =
-          checkedReadNonNegativeIntegerType(i,
-                                            status.elements_end(),
-                                            ndn::tlv::nfd::NInInterests);
-
-        BOOST_REQUIRE_EQUAL(inInterest, counters.getInInterest());
-
-        inData =
-          checkedReadNonNegativeIntegerType(i,
-                                            status.elements_end(),
-                                            ndn::tlv::nfd::NInDatas);
-
-        BOOST_REQUIRE_EQUAL(inData, counters.getInData());
-
-        outInterest =
-          checkedReadNonNegativeIntegerType(i,
-                                            status.elements_end(),
-                                            ndn::tlv::nfd::NOutInterests);
-        BOOST_REQUIRE_EQUAL(outInterest, counters.getOutInterest());
-
-        outData =
-          readNonNegativeIntegerType(*i,
-                                     ndn::tlv::nfd::NOutDatas);
-
-        BOOST_REQUIRE_EQUAL(outData, counters.getOutData());
-      }
+    BOOST_CHECK_EQUAL(status.getFaceId(), reference->getId());
+    BOOST_CHECK_EQUAL(status.getRemoteUri(), reference->getRemoteUri().toString());
+    BOOST_CHECK_EQUAL(status.getLocalUri(), reference->getLocalUri().toString());
+    BOOST_CHECK_EQUAL(status.getFlags(), getFaceFlags(*reference));
+    BOOST_CHECK_EQUAL(status.getNInInterests(), counters.getNInInterests());
+    BOOST_CHECK_EQUAL(status.getNInDatas(), counters.getNInDatas());
+    BOOST_CHECK_EQUAL(status.getNOutInterests(), counters.getNOutInterests());
+    BOOST_CHECK_EQUAL(status.getNOutDatas(), counters.getNOutDatas());
   }
 
   void
