diff --git a/tests/management/test-ndnd-forwarding-entry.cpp b/tests/management/test-ndnd-forwarding-entry.cpp
new file mode 100644
index 0000000..bd5aa9f
--- /dev/null
+++ b/tests/management/test-ndnd-forwarding-entry.cpp
@@ -0,0 +1,59 @@
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#include <boost/test/unit_test.hpp>
+
+#include "management/ndnd-forwarding-entry.hpp"
+
+#if __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wtautological-compare"
+#endif
+
+#include <fstream>
+#include <boost/test/output_test_stream.hpp>
+
+using namespace std;
+namespace ndn {
+namespace ndnd {
+
+const uint8_t FORWARDING_ENTRY[] = {0x81, 0x19, 0x83, 0x07, 0x73, 0x65, 0x6c, 0x66, 0x72, 0x65, 0x67, 0x03, 0x0b, 0x04, 0x01, 0x61, 0x04, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x8a, 0x01, 0x03};
+
+BOOST_AUTO_TEST_SUITE(TestForwardingEntry)
+
+BOOST_AUTO_TEST_CASE (Encode)
+{
+  ForwardingEntry forwardingEntry("selfreg", "/a/prefix", -1, ForwardingFlags(), -1);
+  const Block &wire = forwardingEntry.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(FORWARDING_ENTRY, FORWARDING_ENTRY+sizeof(FORWARDING_ENTRY),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE (Decode)
+{
+  ForwardingEntry forwardingEntry;
+  
+  BOOST_REQUIRE_NO_THROW(forwardingEntry.wireDecode(Block(FORWARDING_ENTRY, sizeof(FORWARDING_ENTRY))));
+
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getAction(), "selfreg");
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getPrefix(), Name("/a/prefix"));
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getFaceId(), -1);
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getActive(), true);
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getChildInherit(), true);
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getAdvertise(), false);
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getLast(), false);
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getCapture(), false);
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getLocal(), false);
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getTap(), false);
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getForwardingFlags().getCaptureOk(), false);
+  BOOST_REQUIRE_EQUAL(forwardingEntry.getFreshnessPeriod(), -1);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace ndnd
+} // namespace ndn
diff --git a/tests/management/test-nfd-control.cpp b/tests/management/test-nfd-control.cpp
new file mode 100644
index 0000000..48295aa
--- /dev/null
+++ b/tests/management/test-nfd-control.cpp
@@ -0,0 +1,108 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "management/control-response.hpp"
+#include "management/fib-management-options.hpp"
+
+#include <boost/test/unit_test.hpp>
+#include <boost/test/output_test_stream.hpp>
+
+using namespace std;
+
+namespace ndn {
+
+BOOST_AUTO_TEST_SUITE(TestNfdControl)
+
+const uint8_t TestControlResponse[] = {0x65, 0x17, 0x66, 0x02, 0x01, 0x94, 0x67, 0x11, 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64};
+
+const uint8_t TestFibManagementOptions[] = {
+  0x68, 0x1e, 0x03, 0x16, 0x04, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68,
+  0x6f, 0x73, 0x74, 0x04, 0x03, 0x72, 0x65, 0x67, 0x04, 0x04, 0x74, 0x65,
+  0x73, 0x74, 0x69, 0x01, 0x00, 0x6a, 0x01, 0x00
+};
+
+// ControlResponse
+
+BOOST_AUTO_TEST_CASE (ControlResponseEncode)
+{
+  ndn::ControlResponse controlResponse(404, "Nothing not found");
+  const Block &wire = controlResponse.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(TestControlResponse, TestControlResponse+sizeof(TestControlResponse),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE (ControlResponseDecode)
+{
+  ndn::ControlResponse controlResponse;
+  
+  BOOST_REQUIRE_NO_THROW(controlResponse.wireDecode(Block(TestControlResponse, sizeof(TestControlResponse))));
+
+  BOOST_REQUIRE_EQUAL(controlResponse.getCode(), 404);
+  BOOST_REQUIRE_EQUAL(controlResponse.getText(), "Nothing not found");
+}
+
+// FibManagementOptions
+
+BOOST_AUTO_TEST_CASE (FibManagementOptionsEncoding)
+{
+  Name n ("/localhost/reg/test");
+  FibManagementOptions opt;
+
+  opt.setName (n);
+  opt.setFaceId (0);
+  opt.setCost (0);
+
+  const ndn::Block& blk = opt.wireEncode ();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS (TestFibManagementOptions,
+                                   TestFibManagementOptions + sizeof (TestFibManagementOptions),
+                                   blk.begin (), blk.end ());
+}
+
+BOOST_AUTO_TEST_CASE (FibManagementOptionsFastEncoding)
+{
+  Name n ("/localhost/reg/test");
+  FibManagementOptions opt;
+
+  opt.setName (n);
+  opt.setFaceId (0);
+  opt.setCost (0);
+
+  EncodingBuffer blk;
+
+  BOOST_REQUIRE_NO_THROW (opt.wireEncode (blk));
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS (TestFibManagementOptions,
+                                   TestFibManagementOptions + sizeof (TestFibManagementOptions),
+                                   blk.begin (), blk.end ());
+
+  EncodingBuffer blk2 (4);
+
+  BOOST_REQUIRE_NO_THROW (opt.wireEncode (blk2));
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS (TestFibManagementOptions,
+                                   TestFibManagementOptions + sizeof (TestFibManagementOptions),
+                                   blk2.begin (), blk2.end ());
+}
+
+BOOST_AUTO_TEST_CASE (FibManagementOptionsDecoding)
+{
+  Block blk (TestFibManagementOptions, sizeof (TestFibManagementOptions));
+  Name n ("/localhost/reg/test");
+  FibManagementOptions opt;
+
+  BOOST_REQUIRE_NO_THROW (opt.wireDecode (blk));
+  
+  BOOST_CHECK_EQUAL (opt.getName (), n);
+  BOOST_CHECK_EQUAL (opt.getFaceId (), 0);
+  BOOST_CHECK_EQUAL (opt.getCost (), 0);
+}
+
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace ndn
