diff --git a/tests/unit-tests/delegation-list.t.cpp b/tests/unit-tests/delegation-list.t.cpp
new file mode 100644
index 0000000..5961af5
--- /dev/null
+++ b/tests/unit-tests/delegation-list.t.cpp
@@ -0,0 +1,371 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2017 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "delegation-list.hpp"
+
+#include "boost-test.hpp"
+#include <boost/lexical_cast.hpp>
+
+namespace ndn {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(TestDelegationList)
+
+const uint8_t DEL1A[] = {
+  0x1f, 0x08, // Delegation
+        0x1e, 0x01, 0x01, // Preference=1
+        0x07, 0x03, 0x08, 0x01, 0x41 // Name=/A
+};
+const uint8_t DEL1B[] = {
+  0x1f, 0x08, // Delegation
+        0x1e, 0x01, 0x01, // Preference=1
+        0x07, 0x03, 0x08, 0x01, 0x42 // Name=/B
+};
+const uint8_t DEL2A[] = {
+  0x1f, 0x08, // Delegation
+        0x1e, 0x01, 0x02, // Preference=2
+        0x07, 0x03, 0x08, 0x01, 0x41 // Name=/A
+};
+const uint8_t DEL2B[] = {
+  0x1f, 0x08, // Delegation
+        0x1e, 0x01, 0x02, // Preference=2
+        0x07, 0x03, 0x08, 0x01, 0x42 // Name=/B
+};
+
+Block
+makeDelegationListBlock(uint32_t type, std::initializer_list<const uint8_t*> dels)
+{
+  Block block(type);
+  for (const uint8_t* del : dels) {
+    block.push_back(Block(del, 2 + del[1]));
+  }
+  block.encode();
+  return block;
+}
+
+BOOST_AUTO_TEST_SUITE(Decode)
+
+BOOST_AUTO_TEST_CASE(DecodeUnsorted)
+{
+  DelegationList dl(makeDelegationListBlock(tlv::ForwardingHint, {DEL2A, DEL2B, DEL1A}), false);
+  BOOST_CHECK_EQUAL(dl.size(), 3);
+  BOOST_CHECK_EQUAL(dl.at(0).preference, 2);
+  BOOST_CHECK_EQUAL(dl.at(0).name, "/A");
+  BOOST_CHECK_EQUAL(dl.at(1).preference, 2);
+  BOOST_CHECK_EQUAL(dl.at(1).name, "/B");
+  BOOST_CHECK_EQUAL(dl.at(2).preference, 1);
+  BOOST_CHECK_EQUAL(dl.at(2).name, "/A");
+}
+
+BOOST_AUTO_TEST_CASE(DecodeSorted)
+{
+  DelegationList dl(makeDelegationListBlock(tlv::Content, {DEL2A, DEL2B, DEL1A}));
+  BOOST_CHECK_EQUAL(dl.size(), 3);
+  BOOST_CHECK_EQUAL(dl.at(0).preference, 1);
+  BOOST_CHECK_EQUAL(dl.at(0).name, "/A");
+  BOOST_CHECK_EQUAL(dl.at(1).preference, 2);
+  BOOST_CHECK_EQUAL(dl.at(1).name, "/A");
+  BOOST_CHECK_EQUAL(dl.at(2).preference, 2);
+  BOOST_CHECK_EQUAL(dl.at(2).name, "/B");
+}
+
+BOOST_AUTO_TEST_CASE(DecodeEmpty)
+{
+  DelegationList dl;
+  Block block = makeDelegationListBlock(tlv::ForwardingHint, {});
+  BOOST_CHECK_THROW(dl.wireDecode(block), DelegationList::Error);
+}
+
+BOOST_AUTO_TEST_CASE(DecodeBadType)
+{
+  DelegationList dl;
+  Block block = makeDelegationListBlock(tlv::Selectors, {DEL1A, DEL2B});
+  BOOST_CHECK_THROW(dl.wireDecode(block), DelegationList::Error);
+}
+
+BOOST_AUTO_TEST_CASE(DecodeNotDelegation)
+{
+  const uint8_t BAD_DEL[] = {
+    0x09, 0x00 // Selectors
+  };
+
+  DelegationList dl;
+  Block block = makeDelegationListBlock(tlv::ForwardingHint, {DEL1A, BAD_DEL});
+  BOOST_CHECK_THROW(dl.wireDecode(block), DelegationList::Error);
+}
+
+BOOST_AUTO_TEST_CASE(DecodeMissingPreference)
+{
+  const uint8_t BAD_DEL[] = {
+    0x1f, 0x05, // Delegation
+          0x07, 0x03, 0x08, 0x01, 0x42 // Name=/B
+  };
+
+  DelegationList dl;
+  Block block = makeDelegationListBlock(tlv::ForwardingHint, {DEL1A, BAD_DEL});
+  BOOST_CHECK_THROW(dl.wireDecode(block), DelegationList::Error);
+}
+
+BOOST_AUTO_TEST_CASE(DecodeMissingName)
+{
+  const uint8_t BAD_DEL[] = {
+    0x1f, 0x03, // Delegation
+          0x1e, 0x01, 0x02, // Preference=2
+  };
+
+  DelegationList dl;
+  Block block = makeDelegationListBlock(tlv::ForwardingHint, {DEL1A, BAD_DEL});
+  BOOST_CHECK_THROW(dl.wireDecode(block), DelegationList::Error);
+}
+
+BOOST_AUTO_TEST_CASE(DecodeUnknownField)
+{
+  const uint8_t BAD_DEL[] = {
+    0x1f, 0x0a, // Delegation
+          0x1e, 0x01, 0x02, // Preference=2
+          0x09, 0x00, // Selectors
+          0x07, 0x03, 0x08, 0x01, 0x42 // Name=/B
+  };
+
+  DelegationList dl;
+  Block block = makeDelegationListBlock(tlv::ForwardingHint, {DEL1A, BAD_DEL});
+  BOOST_CHECK_THROW(dl.wireDecode(block), DelegationList::Error);
+}
+
+BOOST_AUTO_TEST_CASE(DecodeWrongOrder)
+{
+  const uint8_t BAD_DEL[] = {
+    0x1f, 0x08, // Delegation
+          0x07, 0x03, 0x08, 0x01, 0x42, // Name=/B
+          0x1e, 0x01, 0x02 // Preference=2
+  };
+
+  DelegationList dl;
+  Block block = makeDelegationListBlock(tlv::ForwardingHint, {DEL1A, BAD_DEL});
+  BOOST_CHECK_THROW(dl.wireDecode(block), DelegationList::Error);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // Decode
+
+BOOST_AUTO_TEST_SUITE(InsertEncode)
+
+BOOST_AUTO_TEST_CASE(InsertSimple)
+{
+  DelegationList dl;
+  dl.insert(2, "/A");
+  dl.insert(1, "/B");
+  BOOST_CHECK_EQUAL(dl.size(), 2);
+
+  EncodingBuffer encoder;
+  dl.wireEncode(encoder);
+  BOOST_CHECK(encoder.block() == makeDelegationListBlock(tlv::ForwardingHint, {DEL1B, DEL2A}));
+}
+
+BOOST_AUTO_TEST_CASE(InsertReplace)
+{
+  DelegationList dl;
+  dl.insert(2, "/A");
+  dl.insert(Delegation{1, "/A"}, DelegationList::INS_REPLACE);
+  BOOST_CHECK_EQUAL(dl.size(), 1);
+  BOOST_CHECK_EQUAL(dl.at(0).preference, 1);
+  BOOST_CHECK_EQUAL(dl[0].name, "/A");
+
+  EncodingBuffer encoder;
+  dl.wireEncode(encoder);
+  BOOST_CHECK(encoder.block() == makeDelegationListBlock(tlv::ForwardingHint, {DEL1A}));
+}
+
+BOOST_AUTO_TEST_CASE(InsertAppend)
+{
+  DelegationList dl;
+  dl.insert(2, "/A");
+  dl.insert(Delegation{1, "/A"}, DelegationList::INS_APPEND);
+  BOOST_CHECK_EQUAL(dl.size(), 2);
+  BOOST_CHECK_EQUAL(dl.at(0).preference, 1);
+  BOOST_CHECK_EQUAL(dl.at(1).preference, 2);
+
+  EncodingBuffer encoder;
+  dl.wireEncode(encoder);
+  BOOST_CHECK(encoder.block() == makeDelegationListBlock(tlv::ForwardingHint, {DEL1A, DEL2A}));
+}
+
+BOOST_AUTO_TEST_CASE(InsertSkip)
+{
+  DelegationList dl;
+  dl.insert(2, "/A");
+  dl.insert(Delegation{1, "/A"}, DelegationList::INS_SKIP);
+  BOOST_CHECK_EQUAL(dl.size(), 1);
+  BOOST_CHECK_EQUAL(dl.at(0).preference, 2);
+
+  EncodingBuffer encoder;
+  dl.wireEncode(encoder);
+  BOOST_CHECK(encoder.block() == makeDelegationListBlock(tlv::ForwardingHint, {DEL2A}));
+}
+
+BOOST_AUTO_TEST_CASE(Unsorted)
+{
+  DelegationList dl(makeDelegationListBlock(tlv::ForwardingHint, {DEL2A}), false);
+  dl.insert(1, "/B");
+  BOOST_CHECK_EQUAL(dl.size(), 2);
+  BOOST_CHECK_EQUAL(dl.at(0).preference, 2);
+  BOOST_CHECK_EQUAL(dl.at(0).name, "/A");
+  BOOST_CHECK_EQUAL(dl.at(1).preference, 1);
+  BOOST_CHECK_EQUAL(dl.at(1).name, "/B");
+
+  EncodingBuffer encoder;
+  dl.wireEncode(encoder, tlv::Content);
+  BOOST_CHECK(encoder.block() == makeDelegationListBlock(tlv::Content, {DEL2A, DEL1B}));
+}
+
+BOOST_AUTO_TEST_CASE(EncodeBadType)
+{
+  DelegationList dl(makeDelegationListBlock(tlv::ForwardingHint, {DEL2A}));
+  EncodingBuffer encoder;
+  BOOST_CHECK_THROW(dl.wireEncode(encoder, tlv::Selectors), std::invalid_argument);
+}
+
+BOOST_AUTO_TEST_CASE(EncodeEmpty)
+{
+  DelegationList dl;
+  EncodingBuffer encoder;
+  BOOST_CHECK_THROW(dl.wireEncode(encoder), DelegationList::Error);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // InsertEncode
+
+BOOST_AUTO_TEST_SUITE(Erase)
+
+BOOST_AUTO_TEST_CASE(EraseNoop)
+{
+  DelegationList dl;
+  dl.insert(1, "/A");
+  BOOST_CHECK_EQUAL(dl.erase(2, "/A"), 0);
+  BOOST_CHECK_EQUAL(dl.erase(Delegation{1, "/B"}), 0);
+  BOOST_CHECK_EQUAL(dl.size(), 1);
+  BOOST_CHECK_EQUAL(dl.at(0).preference, 1);
+  BOOST_CHECK_EQUAL(dl.at(0).name, "/A");
+}
+
+BOOST_AUTO_TEST_CASE(EraseOne)
+{
+  DelegationList dl;
+  dl.insert(1, "/A");
+  BOOST_CHECK_EQUAL(dl.erase(1, "/A"), 1);
+  BOOST_CHECK_EQUAL(dl.size(), 0);
+}
+
+BOOST_AUTO_TEST_CASE(EraseByName)
+{
+  DelegationList dl;
+  dl.insert(1, "/A");
+  dl.insert(2, "/A", DelegationList::INS_APPEND);
+  BOOST_CHECK_EQUAL(dl.size(), 2);
+  BOOST_CHECK_EQUAL(dl.erase("/A"), 2);
+  BOOST_CHECK_EQUAL(dl.size(), 0);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // Erase
+
+BOOST_AUTO_TEST_SUITE(Sort)
+
+BOOST_AUTO_TEST_CASE(Noop)
+{
+  DelegationList dl(makeDelegationListBlock(tlv::ForwardingHint, {DEL1A}));
+  BOOST_CHECK_EQUAL(dl.isSorted(), true);
+  dl.sort();
+  BOOST_CHECK_EQUAL(dl.isSorted(), true);
+}
+
+BOOST_AUTO_TEST_CASE(Sort)
+{
+  DelegationList dl(makeDelegationListBlock(tlv::ForwardingHint, {DEL2A, DEL2B, DEL1A}), false);
+  BOOST_CHECK_EQUAL(dl.isSorted(), false);
+  dl.sort();
+  BOOST_CHECK_EQUAL(dl.isSorted(), true);
+  BOOST_CHECK_EQUAL(dl.size(), 3);
+  BOOST_CHECK_EQUAL(dl.at(0).preference, 1);
+  BOOST_CHECK_EQUAL(dl.at(0).name, "/A");
+  BOOST_CHECK_EQUAL(dl.at(1).preference, 2);
+  BOOST_CHECK_EQUAL(dl.at(1).name, "/A");
+  BOOST_CHECK_EQUAL(dl.at(2).preference, 2);
+  BOOST_CHECK_EQUAL(dl.at(2).name, "/B");
+}
+
+BOOST_AUTO_TEST_SUITE_END() // Sort
+
+BOOST_AUTO_TEST_SUITE(Compare)
+
+BOOST_AUTO_TEST_CASE(Empty)
+{
+  DelegationList dl1, dl2;
+  BOOST_CHECK_EQUAL(dl1, dl2);
+}
+
+BOOST_AUTO_TEST_CASE(SortedEqual)
+{
+  DelegationList dl1(makeDelegationListBlock(tlv::ForwardingHint, {DEL2A, DEL1B})),
+                 dl2(makeDelegationListBlock(tlv::Content, {DEL1B, DEL2A}));
+  BOOST_CHECK_EQUAL(dl1, dl2);
+}
+
+BOOST_AUTO_TEST_CASE(SortedUnequal)
+{
+  DelegationList dl1(makeDelegationListBlock(tlv::ForwardingHint, {DEL2A, DEL1B})),
+                 dl2(makeDelegationListBlock(tlv::Content, {DEL1A, DEL2B}));
+  BOOST_CHECK_NE(dl1, dl2);
+}
+
+BOOST_AUTO_TEST_CASE(UnsortedSameOrder)
+{
+  DelegationList dl1(makeDelegationListBlock(tlv::ForwardingHint, {DEL2A, DEL1B}), false),
+                 dl2(makeDelegationListBlock(tlv::Content, {DEL2A, DEL1B}), false);
+  BOOST_CHECK_EQUAL(dl1, dl2);
+}
+
+BOOST_AUTO_TEST_CASE(UnsortedDifferentOrder)
+{
+  DelegationList dl1(makeDelegationListBlock(tlv::ForwardingHint, {DEL2A, DEL1B}), false),
+                 dl2(makeDelegationListBlock(tlv::Content, {DEL1B, DEL2A}), false);
+  BOOST_CHECK_NE(dl1, dl2);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // Compare
+
+BOOST_AUTO_TEST_SUITE(Print)
+
+BOOST_AUTO_TEST_CASE(PrintEmpty)
+{
+  DelegationList dl;
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(dl), "[]");
+}
+
+BOOST_AUTO_TEST_CASE(PrintNormal)
+{
+  DelegationList dl(makeDelegationListBlock(tlv::ForwardingHint, {DEL2A, DEL1B}));
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(dl), "[/B(1),/A(2)]");
+}
+
+BOOST_AUTO_TEST_SUITE_END() // Print
+
+BOOST_AUTO_TEST_SUITE_END() // TestDelegationList
+
+} // namespace tests
+} // namespace ndn
diff --git a/tests/unit-tests/delegation.t.cpp b/tests/unit-tests/delegation.t.cpp
new file mode 100644
index 0000000..f15f578
--- /dev/null
+++ b/tests/unit-tests/delegation.t.cpp
@@ -0,0 +1,64 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2017 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "delegation.hpp"
+
+#include "boost-test.hpp"
+#include <boost/lexical_cast.hpp>
+
+namespace ndn {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(TestDelegation)
+
+BOOST_AUTO_TEST_CASE(Compare)
+{
+  BOOST_CHECK_EQUAL((Delegation{1, "/A"}), (Delegation{1, "/A"}));
+  BOOST_CHECK_LE((Delegation{1, "/A"}), (Delegation{1, "/A"}));
+  BOOST_CHECK_GE((Delegation{1, "/A"}), (Delegation{1, "/A"}));
+
+  BOOST_CHECK_NE((Delegation{1, "/A"}), (Delegation{2, "/A"}));
+  BOOST_CHECK_NE((Delegation{1, "/A"}), (Delegation{1, "/B"}));
+
+  BOOST_CHECK_LT((Delegation{1, "/A"}), (Delegation{1, "/B"}));
+  BOOST_CHECK_LE((Delegation{1, "/A"}), (Delegation{1, "/B"}));
+  BOOST_CHECK_LT((Delegation{1, "/B"}), (Delegation{2, "/A"}));
+  BOOST_CHECK_LE((Delegation{1, "/B"}), (Delegation{2, "/A"}));
+  BOOST_CHECK_LT((Delegation{1, "/A"}), (Delegation{2, "/A"}));
+  BOOST_CHECK_LE((Delegation{1, "/A"}), (Delegation{2, "/A"}));
+
+  BOOST_CHECK_GT((Delegation{1, "/B"}), (Delegation{1, "/A"}));
+  BOOST_CHECK_GE((Delegation{1, "/B"}), (Delegation{1, "/A"}));
+  BOOST_CHECK_GT((Delegation{2, "/A"}), (Delegation{1, "/B"}));
+  BOOST_CHECK_GE((Delegation{2, "/A"}), (Delegation{1, "/B"}));
+  BOOST_CHECK_GT((Delegation{2, "/A"}), (Delegation{1, "/A"}));
+  BOOST_CHECK_GE((Delegation{2, "/A"}), (Delegation{1, "/A"}));
+}
+
+BOOST_AUTO_TEST_CASE(Print)
+{
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(Delegation{1, "/B"}), "/B(1)");
+}
+
+BOOST_AUTO_TEST_SUITE_END() // TestDelegation
+
+} // namespace tests
+} // namespace ndn
