diff --git a/src/interest.cpp b/src/interest.cpp
index d618475..3f8352b 100644
--- a/src/interest.cpp
+++ b/src/interest.cpp
@@ -37,7 +37,6 @@
 Interest::Interest(const Name& name, time::milliseconds interestLifetime)
   : m_name(name)
   , m_interestLifetime(interestLifetime)
-  , m_selectedDelegationIndex(INVALID_SELECTED_DELEGATION_INDEX)
 {
   if (interestLifetime < time::milliseconds::zero()) {
     BOOST_THROW_EXCEPTION(std::invalid_argument("InterestLifetime must be >= 0"));
@@ -63,24 +62,9 @@
   //                Nonce
   //                InterestLifetime?
   //                ForwardingHint?
-  //                Link?
-  //                SelectedDelegation?
 
   // (reverse encoding)
 
-  // Link and SelectedDelegation
-  if (hasLink()) {
-    if (hasSelectedDelegation()) {
-      totalLength += prependNonNegativeIntegerBlock(encoder,
-                                                    tlv::SelectedDelegation,
-                                                    m_selectedDelegationIndex);
-    }
-    totalLength += encoder.prependBlock(m_link);
-  }
-  else {
-    BOOST_ASSERT(!hasSelectedDelegation());
-  }
-
   // ForwardingHint
   if (m_forwardingHint.size() > 0) {
     totalLength += m_forwardingHint.wireEncode(encoder);
@@ -130,9 +114,7 @@
   EncodingBuffer buffer(estimatedSize, 0);
   wireEncode(buffer);
 
-  // to ensure that Link block points to the right memory location
   const_cast<Interest*>(this)->wireDecode(buffer.block());
-
   return m_wire;
 }
 
@@ -185,34 +167,6 @@
   else {
     m_forwardingHint = DelegationList();
   }
-
-  // Link
-  m_linkCached.reset();
-  val = m_wire.find(tlv::Data);
-  if (val != m_wire.elements_end()) {
-    m_link = (*val);
-  }
-  else {
-    m_link = Block();
-  }
-
-  // SelectedDelegation
-  val = m_wire.find(tlv::SelectedDelegation);
-  if (val != m_wire.elements_end()) {
-    if (!this->hasLink()) {
-      BOOST_THROW_EXCEPTION(Error("Interest contains SelectedDelegation, but no LINK object"));
-    }
-    uint64_t selectedDelegation = readNonNegativeInteger(*val);
-    if (selectedDelegation < uint64_t(Link::countDelegationsFromWire(m_link))) {
-      m_selectedDelegationIndex = static_cast<size_t>(selectedDelegation);
-    }
-    else {
-      BOOST_THROW_EXCEPTION(Error("Invalid selected delegation index when decoding Interest"));
-    }
-  }
-  else {
-    m_selectedDelegationIndex = INVALID_SELECTED_DELEGATION_INDEX;
-  }
 }
 
 // ---- matching ----
@@ -388,90 +342,6 @@
   return *this;
 }
 
-bool
-Interest::hasLink() const
-{
-  return m_link.hasWire();
-}
-
-const Link&
-Interest::getLink() const
-{
-  if (hasLink()) {
-    if (!m_linkCached) {
-      m_linkCached = make_shared<Link>(m_link);
-    }
-    return *m_linkCached;
-  }
-  BOOST_THROW_EXCEPTION(Error("There is no encapsulated link object"));
-}
-
-void
-Interest::setLink(const Block& link)
-{
-  m_link = link;
-  if (!link.hasWire()) {
-    BOOST_THROW_EXCEPTION(Error("The given link does not have a wire format"));
-  }
-  m_wire.reset();
-  m_linkCached.reset();
-  this->unsetSelectedDelegation();
-}
-
-void
-Interest::unsetLink()
-{
-  m_link.reset();
-  m_wire.reset();
-  m_linkCached.reset();
-  this->unsetSelectedDelegation();
-}
-
-bool
-Interest::hasSelectedDelegation() const
-{
-  return m_selectedDelegationIndex != INVALID_SELECTED_DELEGATION_INDEX;
-}
-
-Name
-Interest::getSelectedDelegation() const
-{
-  if (!hasSelectedDelegation()) {
-    BOOST_THROW_EXCEPTION(Error("There is no encapsulated selected delegation"));
-  }
-  return std::get<1>(Link::getDelegationFromWire(m_link, m_selectedDelegationIndex));
-}
-
-void
-Interest::setSelectedDelegation(const Name& delegationName)
-{
-  size_t delegationIndex = Link::findDelegationFromWire(m_link, delegationName);
-  if (delegationIndex != INVALID_SELECTED_DELEGATION_INDEX) {
-    m_selectedDelegationIndex = delegationIndex;
-  }
-  else {
-    BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid selected delegation name"));
-  }
-  m_wire.reset();
-}
-
-void
-Interest::setSelectedDelegation(size_t delegationIndex)
-{
-  if (delegationIndex >= Link(m_link).getDelegations().size()) {
-    BOOST_THROW_EXCEPTION(Error("Invalid selected delegation index"));
-  }
-  m_selectedDelegationIndex = delegationIndex;
-  m_wire.reset();
-}
-
-void
-Interest::unsetSelectedDelegation()
-{
-  m_selectedDelegationIndex = INVALID_SELECTED_DELEGATION_INDEX;
-  m_wire.reset();
-}
-
 // ---- operators ----
 
 std::ostream&
diff --git a/src/interest.hpp b/src/interest.hpp
index 7a45bc8..1ee2cda 100644
--- a/src/interest.hpp
+++ b/src/interest.hpp
@@ -23,7 +23,6 @@
 #define NDN_INTEREST_HPP
 
 #include "delegation-list.hpp"
-#include "link.hpp"
 #include "name.hpp"
 #include "selectors.hpp"
 #include "tag-host.hpp"
@@ -329,77 +328,6 @@
     return *this;
   }
 
-public: // Link and SelectedDelegation
-  /**
-   * @brief Check whether the Interest contains a Link object
-   * @return True if there is a link object, otherwise false
-   */
-  bool
-  hasLink() const;
-
-  /**
-   * @brief Get the link object for this interest
-   * @return The link object if there is one contained in this interest
-   * @throws Interest::Error if there is no link object contained in the interest
-   * @throws tlv::Error if the incorporated link object is malformed
-   */
-  const Link&
-  getLink() const;
-
-  /**
-   * @brief Set the link object for this interest
-   * @param link The link object that will be included in this interest (in wire format)
-   * @post !hasSelectedDelegation()
-   */
-  void
-  setLink(const Block& link);
-
-  /**
-   * @brief Delete the link object for this interest
-   * @post !hasLink()
-   */
-  void
-  unsetLink();
-
-  /**
-   * @brief Check whether the Interest includes a selected delegation
-   * @return True if there is a selected delegation, otherwise false
-   */
-  bool
-  hasSelectedDelegation() const;
-
-  /**
-   * @brief Get the name of the selected delegation
-   * @return The name of the selected delegation
-   * @throw Error SelectedDelegation is not set.
-   */
-  Name
-  getSelectedDelegation() const;
-
-  /**
-   * @brief Set the selected delegation
-   * @param delegationName The name of the selected delegation
-   * @throw Error Link is not set.
-   * @throw std::invalid_argument @p delegationName does not exist in Link.
-   */
-  void
-  setSelectedDelegation(const Name& delegationName);
-
-  /**
-   * @brief Set the selected delegation
-   * @param delegationIndex The index of the selected delegation
-   * @throw Error Link is not set.
-   * @throw std::out_of_range @p delegationIndex is out of bound in Link.
-   */
-  void
-  setSelectedDelegation(size_t delegationIndex);
-
-  /**
-   * @brief Unset the selected delegation
-   */
-  void
-  unsetSelectedDelegation();
-
 private:
   Name m_name;
   Selectors m_selectors;
@@ -407,9 +335,6 @@
   time::milliseconds m_interestLifetime;
   DelegationList m_forwardingHint;
 
-  mutable Block m_link;
-  mutable shared_ptr<Link> m_linkCached;
-  size_t m_selectedDelegationIndex;
   mutable Block m_wire;
 };
 
diff --git a/src/link.hpp b/src/link.hpp
index 3fc4387..e358404 100644
--- a/src/link.hpp
+++ b/src/link.hpp
@@ -1,5 +1,5 @@
 /* -*- 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).
@@ -28,8 +28,6 @@
 
 namespace ndn {
 
-const size_t INVALID_SELECTED_DELEGATION_INDEX = std::numeric_limits<size_t>::max();
-
 /** @brief represents a Link object
  */
 class Link : public Data
diff --git a/tests/unit-tests/interest.t.cpp b/tests/unit-tests/interest.t.cpp
index f108be6..7c5d0f0 100644
--- a/tests/unit-tests/interest.t.cpp
+++ b/tests/unit-tests/interest.t.cpp
@@ -41,8 +41,6 @@
   BOOST_CHECK(i.getSelectors().empty());
   BOOST_CHECK_EQUAL(i.hasNonce(), false);
   BOOST_CHECK_EQUAL(i.getInterestLifetime(), DEFAULT_INTEREST_LIFETIME);
-  BOOST_CHECK_EQUAL(i.hasLink(), false);
-  BOOST_CHECK(!i.hasSelectedDelegation());
 }
 
 BOOST_AUTO_TEST_CASE(EncodeDecodeBasic)
@@ -110,57 +108,6 @@
   BOOST_CHECK_EQUAL(i1, i2);
 }
 
-const uint8_t LINK[] = {
-  0x06, 0xda, // Data
-      0x07, 0x14, // Name
-          0x08, 0x05,
-              0x6c, 0x6f, 0x63, 0x61, 0x6c,
-          0x08, 0x03,
-              0x6e, 0x64, 0x6e,
-          0x08, 0x06,
-              0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
-      0x14, 0x07, // MetaInfo
-          0x18, 0x01, // ContentType
-              0x01,
-          0x19, 0x02, // FreshnessPeriod
-              0x27, 0x10,
-      0x15, 0x1a, // Content
-          0x1f, 0x0c, // LinkDelegation
-              0x1e, 0x01, // LinkPreference
-                  0x0a,
-              0x07, 0x07, // Name
-                  0x08, 0x05,
-                      0x6c, 0x6f, 0x63, 0x61, 0x6c,
-          0x1f, 0x0a, // LinkDelegation
-              0x1e, 0x01, // LinkPreference
-                  0x14,
-              0x07, 0x05, // Name
-                  0x08, 0x03,
-                      0x6e, 0x64, 0x6e,
-       0x16, 0x1b, // SignatureInfo
-           0x1b, 0x01, // SignatureType
-               0x01,
-       0x1c, 0x16, // KeyLocator
-           0x07, 0x14, // Name
-               0x08, 0x04,
-                   0x74, 0x65, 0x73, 0x74,
-               0x08, 0x03,
-                   0x6b, 0x65, 0x79,
-               0x08, 0x07,
-                   0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
-       0x17, 0x80, // SignatureValue
-           0x2f, 0xd6, 0xf1, 0x6e, 0x80, 0x6f, 0x10, 0xbe, 0xb1, 0x6f, 0x3e, 0x31, 0xec,
-           0xe3, 0xb9, 0xea, 0x83, 0x30, 0x40, 0x03, 0xfc, 0xa0, 0x13, 0xd9, 0xb3, 0xc6,
-           0x25, 0x16, 0x2d, 0xa6, 0x58, 0x41, 0x69, 0x62, 0x56, 0xd8, 0xb3, 0x6a, 0x38,
-           0x76, 0x56, 0xea, 0x61, 0xb2, 0x32, 0x70, 0x1c, 0xb6, 0x4d, 0x10, 0x1d, 0xdc,
-           0x92, 0x8e, 0x52, 0xa5, 0x8a, 0x1d, 0xd9, 0x96, 0x5e, 0xc0, 0x62, 0x0b, 0xcf,
-           0x3a, 0x9d, 0x7f, 0xca, 0xbe, 0xa1, 0x41, 0x71, 0x85, 0x7a, 0x8b, 0x5d, 0xa9,
-           0x64, 0xd6, 0x66, 0xb4, 0xe9, 0x8d, 0x0c, 0x28, 0x43, 0xee, 0xa6, 0x64, 0xe8,
-           0x55, 0xf6, 0x1c, 0x19, 0x0b, 0xef, 0x99, 0x25, 0x1e, 0xdc, 0x78, 0xb3, 0xa7,
-           0xaa, 0x0d, 0x14, 0x58, 0x30, 0xe5, 0x37, 0x6a, 0x6d, 0xdb, 0x56, 0xac, 0xa3,
-           0xfc, 0x90, 0x7a, 0xb8, 0x66, 0x9c, 0x0e, 0xf6, 0xb7, 0x64, 0xd1
-};
-
 BOOST_AUTO_TEST_CASE(WireDecodeReset) // checks wireDecode resets all fields
 {
   Interest i1;
@@ -168,24 +115,18 @@
   i1.setMinSuffixComponents(100);
   i1.setNonce(10);
   i1.setInterestLifetime(time::seconds(10));
-  i1.setLink(Block(LINK, sizeof(LINK)));
-  i1.setSelectedDelegation(0);
 
   Interest i2(i1.wireEncode());
   BOOST_CHECK_EQUAL(i2.getName().toUri(), "/test");
   BOOST_CHECK_EQUAL(i2.getInterestLifetime(), time::seconds(10));
   BOOST_CHECK_EQUAL(i2.getMinSuffixComponents(), 100);
   BOOST_CHECK_EQUAL(i2.getNonce(), 10);
-  BOOST_CHECK_EQUAL(i2.hasLink(), true);
-  BOOST_CHECK_EQUAL(i2.hasSelectedDelegation(), true);
 
   i2.wireDecode(Interest().wireEncode());
   BOOST_CHECK_EQUAL(i2.getName().toUri(), "/");
   BOOST_CHECK_EQUAL(i2.getInterestLifetime(), DEFAULT_INTEREST_LIFETIME);
   BOOST_CHECK_EQUAL(i2.getMinSuffixComponents(), -1);
   BOOST_WARN_NE(i2.getNonce(), 10);
-  BOOST_CHECK_EQUAL(i2.hasLink(), false);
-  BOOST_CHECK_EQUAL(i2.hasSelectedDelegation(), false);
 }
 
 BOOST_AUTO_TEST_CASE(DecodeNoName)
@@ -314,7 +255,7 @@
     .setExclude(Exclude().excludeAfter(name::Component("J")))
     .setNonce(10)
     .setInterestLifetime(time::seconds(5))
-    .setLink(Block(LINK, sizeof(LINK)));
+    .setForwardingHint({{1, "/H"}});
 
   Interest other;
   BOOST_CHECK_EQUAL(interest.matchesInterest(other), false);
@@ -325,7 +266,7 @@
   other.setSelectors(interest.getSelectors());
   BOOST_CHECK_EQUAL(interest.matchesInterest(other), false); // will match until #3162 implemented
 
-  other.setLink(interest.getLink().wireEncode());
+  other.setForwardingHint({{1, "/H"}});
   BOOST_CHECK_EQUAL(interest.matchesInterest(other), true);
 
   other.setNonce(200);
@@ -333,9 +274,6 @@
 
   other.setInterestLifetime(time::hours(5));
   BOOST_CHECK_EQUAL(interest.matchesInterest(other), true);
-
-  other.setSelectedDelegation(0);
-  BOOST_CHECK_EQUAL(interest.matchesInterest(other), true);
 }
 
 // ---- field accessors ----
@@ -475,407 +413,16 @@
   BOOST_CHECK_EQUAL(a == b, true);
   BOOST_CHECK_EQUAL(a != b, false);
 
-  ///\todo #4055 compare ForwardingHint
-
-  // compare Link
-  a.setLink(Block(LINK, sizeof(LINK)));
+  // compare ForwardingHint
+  a.setForwardingHint({{1, "/H"}});
   BOOST_CHECK_EQUAL(a == b, false);
   BOOST_CHECK_EQUAL(a != b, true);
 
-  b.setLink(Block(LINK, sizeof(LINK)));
-  BOOST_CHECK_EQUAL(a == b, true);
-  BOOST_CHECK_EQUAL(a != b, false);
-
-  // compare SelectedDelegation
-  BOOST_CHECK_EQUAL(a.hasSelectedDelegation(), false);
-  BOOST_CHECK_EQUAL(b.hasSelectedDelegation(), false);
-
-  a.setSelectedDelegation(Name("/local"));
-  BOOST_CHECK_EQUAL(a == b, false);
-  BOOST_CHECK_EQUAL(a != b, true);
-
-  b.setSelectedDelegation(Name("/local"));
+  b.setForwardingHint({{1, "/H"}});
   BOOST_CHECK_EQUAL(a == b, true);
   BOOST_CHECK_EQUAL(a != b, false);
 }
 
-BOOST_FIXTURE_TEST_SUITE(LinkSelectedDelegation, IdentityManagementFixture)
-
-const uint8_t InterestWithLink[] = {
-  0x05,  0xfb, // Interest
-      0x07,  0x14, // Name
-          0x08,  0x5, // NameComponent
-              0x6c,  0x6f,  0x63,  0x61,  0x6c,
-          0x08,  0x3, // NameComponent
-              0x6e,  0x64,  0x6e,
-          0x08,  0x6, // NameComponent
-              0x70,  0x72,  0x65,  0x66,  0x69,  0x78,
-      0x0a,  0x4, // Nonce
-          0x1, 0x0, 0x0, 0x00,
-      0x06, 0xda, // Data
-          0x07, 0x14, // Name
-              0x08, 0x05,
-                  0x6c, 0x6f, 0x63, 0x61, 0x6c,
-              0x08, 0x03,
-                  0x6e, 0x64, 0x6e,
-              0x08, 0x06,
-                  0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
-          0x14, 0x07, // MetaInfo
-              0x18, 0x01, // ContentType
-                  0x01,
-              0x19, 0x02, // FreshnessPeriod
-                  0x27, 0x10,
-          0x15, 0x1a, // Content
-              0x1f, 0x0c, // LinkDelegation
-                  0x1e, 0x01, // LinkPreference
-                      0x0a,
-                  0x07, 0x07, // Name
-                      0x08, 0x05,
-                          0x6c, 0x6f, 0x63, 0x61, 0x6c,
-              0x1f, 0x0a, // LinkDelegation
-                  0x1e, 0x01, // LinkPreference
-                      0x14,
-                  0x07, 0x05, // Name
-                      0x08, 0x03,
-                          0x6e, 0x64, 0x6e,
-           0x16, 0x1b, // SignatureInfo
-               0x1b, 0x01, // SignatureType
-                   0x01,
-           0x1c, 0x16, // KeyLocator
-               0x07, 0x14, // Name
-                   0x08, 0x04,
-                       0x74, 0x65, 0x73, 0x74,
-                   0x08, 0x03,
-                       0x6b, 0x65, 0x79,
-                   0x08, 0x07,
-                       0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
-           0x17, 0x80, // SignatureValue
-               0x2f, 0xd6, 0xf1, 0x6e, 0x80, 0x6f, 0x10, 0xbe, 0xb1, 0x6f, 0x3e, 0x31, 0xec,
-               0xe3, 0xb9, 0xea, 0x83, 0x30, 0x40, 0x03, 0xfc, 0xa0, 0x13, 0xd9, 0xb3, 0xc6,
-               0x25, 0x16, 0x2d, 0xa6, 0x58, 0x41, 0x69, 0x62, 0x56, 0xd8, 0xb3, 0x6a, 0x38,
-               0x76, 0x56, 0xea, 0x61, 0xb2, 0x32, 0x70, 0x1c, 0xb6, 0x4d, 0x10, 0x1d, 0xdc,
-               0x92, 0x8e, 0x52, 0xa5, 0x8a, 0x1d, 0xd9, 0x96, 0x5e, 0xc0, 0x62, 0x0b, 0xcf,
-               0x3a, 0x9d, 0x7f, 0xca, 0xbe, 0xa1, 0x41, 0x71, 0x85, 0x7a, 0x8b, 0x5d, 0xa9,
-               0x64, 0xd6, 0x66, 0xb4, 0xe9, 0x8d, 0x0c, 0x28, 0x43, 0xee, 0xa6, 0x64, 0xe8,
-               0x55, 0xf6, 0x1c, 0x19, 0x0b, 0xef, 0x99, 0x25, 0x1e, 0xdc, 0x78, 0xb3, 0xa7,
-               0xaa, 0x0d, 0x14, 0x58, 0x30, 0xe5, 0x37, 0x6a, 0x6d, 0xdb, 0x56, 0xac, 0xa3,
-               0xfc, 0x90, 0x7a, 0xb8, 0x66, 0x9c, 0x0e, 0xf6, 0xb7, 0x64, 0xd1,
-      0x20, 0x01, // SelectedDelegation
-          0x00
-};
-
-const uint8_t InterestWithSelectedDelegationButNoLink[] = {
-  0x05,  0x1f, // Interest
-      0x07,  0x14, // Name
-          0x08,  0x5, // NameComponent
-              0x6c,  0x6f,  0x63,  0x61,  0x6c,
-          0x08,  0x3, // NameComponent
-              0x6e,  0x64,  0x6e,
-          0x08,  0x6, // NameComponent
-              0x70,  0x72,  0x65,  0x66,  0x69,  0x78,
-      0x0a,  0x4, // Nonce
-          0x1, 0x0, 0x0, 0x00,
-      0x20, 0x01, // SelectedDelegation
-          0x00
-};
-
-const uint8_t InterestWithLinkNotNonIntegerSelectedDelegation[] = {
-  0x05,  0xfb, // Interest
-      0x07,  0x14, // Name
-          0x08,  0x5, // NameComponent
-              0x6c,  0x6f,  0x63,  0x61,  0x6c,
-          0x08,  0x3, // NameComponent
-              0x6e,  0x64,  0x6e,
-          0x08,  0x6, // NameComponent
-              0x70,  0x72,  0x65,  0x66,  0x69,  0x78,
-      0x0a,  0x4, // Nonce
-          0x1, 0x0, 0x0, 0x00,
-      0x06, 0xda, // Data
-          0x07, 0x14, // Name
-              0x08, 0x05,
-                  0x6c, 0x6f, 0x63, 0x61, 0x6c,
-              0x08, 0x03,
-                  0x6e, 0x64, 0x6e,
-              0x08, 0x06,
-                  0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
-          0x14, 0x07, // MetaInfo
-              0x18, 0x01, // ContentType
-                  0x01,
-              0x19, 0x02, // FreshnessPeriod
-                  0x27, 0x10,
-          0x15, 0x1a, // Content
-              0x1f, 0x0c, // LinkDelegation
-                  0x1e, 0x01, // LinkPreference
-                      0x0a,
-                  0x07, 0x07, // Name
-                      0x08, 0x05,
-                          0x6c, 0x6f, 0x63, 0x61, 0x6c,
-              0x1f, 0x0a, // LinkDelegation
-                  0x1e, 0x01, // LinkPreference
-                      0x14,
-                  0x07, 0x05, // Name
-                      0x08, 0x03,
-                          0x6e, 0x64, 0x6e,
-           0x16, 0x1b, // SignatureInfo
-               0x1b, 0x01, // SignatureType
-                   0x01,
-           0x1c, 0x16, // KeyLocator
-               0x07, 0x14, // Name
-                   0x08, 0x04,
-                       0x74, 0x65, 0x73, 0x74,
-                   0x08, 0x03,
-                       0x6b, 0x65, 0x79,
-                   0x08, 0x07,
-                       0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
-           0x17, 0x78, // SignatureValue
-               0x2f, 0xd6, 0xf1, 0x6e, 0x80, 0x6f, 0x10, 0xbe, 0xb1, 0x6f, 0x3e, 0x31, 0xec,
-               0xe3, 0xb9, 0xea, 0x83, 0x30, 0x40, 0x03, 0xfc, 0xa0, 0x13, 0xd9, 0xb3, 0xc6,
-               0x25, 0x16, 0x2d, 0xa6, 0x58, 0x41, 0x69, 0x62, 0x56, 0xd8, 0xb3, 0x6a, 0x38,
-               0x76, 0x56, 0xea, 0x61, 0xb2, 0x32, 0x70, 0x1c, 0xb6, 0x4d, 0x10, 0x1d, 0xdc,
-               0x92, 0x8e, 0x52, 0xa5, 0x8a, 0x1d, 0xd9, 0x96, 0x5e, 0xc0, 0x62, 0x0b, 0xcf,
-               0x3a, 0x9d, 0x7f, 0xca, 0xbe, 0xa1, 0x41, 0x71, 0x85, 0x7a, 0x8b, 0x5d, 0xa9,
-               0x64, 0xd6, 0x66, 0xb4, 0xe9, 0x8d, 0x0c, 0x28, 0x43, 0xee, 0xa6, 0x64, 0xe8,
-               0x55, 0xf6, 0x1c, 0x19, 0x0b, 0xef, 0x99, 0x25, 0x1e, 0xdc, 0x78, 0xb3, 0xa7,
-               0xaa, 0x0d, 0x14, 0x58, 0x30, 0xe5, 0x37, 0x6a, 0x6d, 0xdb, 0x56, 0xac, 0xa3,
-               0xfc, 0x90, 0x7a, 0xb8, 0x66, 0x9c, 0x0e, 0xf6, 0xb7,
-      0x20, 0x03, // SelectedDelegation
-          0xAA, 0xAA, 0xAA
-};
-
-const uint8_t InterestWithLinkNonDecreasingOrder[] = {
-  0x05,  0xfb, // Interest
-      0x07,  0x14, // Name
-          0x08,  0x5, // NameComponent
-              0x6c,  0x6f,  0x63,  0x61,  0x6c,
-          0x08,  0x3, // NameComponent
-              0x6e,  0x64,  0x6e,
-          0x08,  0x6, // NameComponent
-              0x70,  0x72,  0x65,  0x66,  0x69,  0x78,
-      0x0a,  0x4, // Nonce
-          0x1, 0x0, 0x0, 0x00,
-      0x06, 0xda, // Data
-          0x07, 0x14, // Name
-              0x08, 0x05,
-                  0x6c, 0x6f, 0x63, 0x61, 0x6c,
-              0x08, 0x03,
-                  0x6e, 0x64, 0x6e,
-              0x08, 0x06,
-                  0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
-          0x14, 0x07, // MetaInfo
-              0x18, 0x01, // ContentType
-                  0x01,
-              0x19, 0x02, // FreshnessPeriod
-                  0x27, 0x10,
-          0x15, 0x1a, // Content
-              0x1f, 0x0c, // LinkDelegation
-                  0x1e, 0x01, // LinkPreference
-                      0x14,
-                  0x07, 0x07, // Name
-                      0x08, 0x05,
-                          0x6c, 0x6f, 0x63, 0x61, 0x6c,
-              0x1f, 0x0a, // LinkDelegation
-                  0x1e, 0x01, // LinkPreference
-                      0x0a,
-                  0x07, 0x05, // Name
-                      0x08, 0x03,
-                          0x6e, 0x64, 0x6e,
-           0x16, 0x1b, // SignatureInfo
-               0x1b, 0x01, // SignatureType
-                   0x01,
-           0x1c, 0x16, // KeyLocator
-               0x07, 0x14, // Name
-                   0x08, 0x04,
-                       0x74, 0x65, 0x73, 0x74,
-                   0x08, 0x03,
-                       0x6b, 0x65, 0x79,
-                   0x08, 0x07,
-                       0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72,
-           0x17, 0x80, // SignatureValue
-               0x2f, 0xd6, 0xf1, 0x6e, 0x80, 0x6f, 0x10, 0xbe, 0xb1, 0x6f, 0x3e, 0x31, 0xec,
-               0xe3, 0xb9, 0xea, 0x83, 0x30, 0x40, 0x03, 0xfc, 0xa0, 0x13, 0xd9, 0xb3, 0xc6,
-               0x25, 0x16, 0x2d, 0xa6, 0x58, 0x41, 0x69, 0x62, 0x56, 0xd8, 0xb3, 0x6a, 0x38,
-               0x76, 0x56, 0xea, 0x61, 0xb2, 0x32, 0x70, 0x1c, 0xb6, 0x4d, 0x10, 0x1d, 0xdc,
-               0x92, 0x8e, 0x52, 0xa5, 0x8a, 0x1d, 0xd9, 0x96, 0x5e, 0xc0, 0x62, 0x0b, 0xcf,
-               0x3a, 0x9d, 0x7f, 0xca, 0xbe, 0xa1, 0x41, 0x71, 0x85, 0x7a, 0x8b, 0x5d, 0xa9,
-               0x64, 0xd6, 0x66, 0xb4, 0xe9, 0x8d, 0x0c, 0x28, 0x43, 0xee, 0xa6, 0x64, 0xe8,
-               0x55, 0xf6, 0x1c, 0x19, 0x0b, 0xef, 0x99, 0x25, 0x1e, 0xdc, 0x78, 0xb3, 0xa7,
-               0xaa, 0x0d, 0x14, 0x58, 0x30, 0xe5, 0x37, 0x6a, 0x6d, 0xdb, 0x56, 0xac, 0xa3,
-               0xfc, 0x90, 0x7a, 0xb8, 0x66, 0x9c, 0x0e, 0xf6, 0xb7, 0x64, 0xd1,
-      0x20, 0x01, // SelectedDelegation
-          0x01
-};
-
-BOOST_AUTO_TEST_CASE(LinkObject)
-{
-  Link link1("test", {{100, "/test3"}, {20, "/test2"}, {10, "/test1"}});
-  m_keyChain.sign(link1);
-  Block wire = link1.wireEncode();
-
-  Interest a;
-  BOOST_REQUIRE_NO_THROW(a.setLink(wire));
-
-  BOOST_REQUIRE_NO_THROW(a.getLink());
-
-  Link link2 = a.getLink();
-  Name name = link2.getName();
-  BOOST_CHECK_EQUAL(Name("test"), name);
-  BOOST_CHECK_EQUAL(a.hasLink(), true);
-  Link::DelegationSet delegations;
-  delegations = link2.getDelegations();
-
-  auto i = delegations.begin();
-  BOOST_CHECK_EQUAL(std::get<0>(*i), 10);
-  BOOST_CHECK_EQUAL(std::get<1>(*i), Name("test1"));
-  ++i;
-  BOOST_CHECK_EQUAL(std::get<0>(*i), 20);
-  BOOST_CHECK_EQUAL(std::get<1>(*i), Name("test2"));
-  ++i;
-  BOOST_CHECK_EQUAL(std::get<0>(*i), 100);
-  BOOST_CHECK_EQUAL(std::get<1>(*i), Name("test3"));
-
-  a.setLink(Block(LINK, sizeof(LINK)));
-  BOOST_CHECK_EQUAL(a.getLink().getDelegations().size(), 2);
-
-  a.unsetLink();
-  BOOST_CHECK_EQUAL(a.hasLink(), false);
-}
-
-BOOST_AUTO_TEST_CASE(SelectedDelegationChecks)
-{
-  Link link("test", {{10, "/test1"}, {20, "/test2"}, {100, "/test3"}});
-  m_keyChain.sign(link);
-  Block wire = link.wireEncode();
-
-  Interest a;
-  a.setLink(wire);
-  BOOST_CHECK_EQUAL(a.hasSelectedDelegation(), false);
-
-  BOOST_REQUIRE_NO_THROW(a.setSelectedDelegation(Name("test2")));
-  BOOST_CHECK_EQUAL(a.getSelectedDelegation(), Name("test2"));
-
-  BOOST_REQUIRE_NO_THROW(a.setSelectedDelegation(uint32_t(2)));
-  BOOST_CHECK_EQUAL(a.getSelectedDelegation(), Name("test3"));
-
-  a.unsetSelectedDelegation();
-  BOOST_CHECK_EQUAL(a.hasSelectedDelegation(), false);
-}
-
-BOOST_AUTO_TEST_CASE(EncodeDecodeWithLink)
-{
-  Link link1("test", {{10, "/test1"}, {20, "/test2"}, {100, "/test3"}});
-  m_keyChain.sign(link1);
-  Block wire = link1.wireEncode();
-
-  Interest a;
-  a.setName("/Test/Encode/Decode/With/Link");
-  a.setChildSelector(1);
-  a.setNonce(100);
-  a.setInterestLifetime(time::seconds(10));
-  a.setLink(wire);
-
-  Block interestBlock = a.wireEncode();
-  Interest b(interestBlock);
-
-  BOOST_CHECK_EQUAL(a == b, true);
-
-  Link link2 = b.getLink();
-  Link::DelegationSet delegations;
-  delegations = link2.getDelegations();
-
-  auto i = delegations.begin();
-  BOOST_CHECK_EQUAL(std::get<0>(*i), 10);
-  BOOST_CHECK_EQUAL(std::get<1>(*i), Name("test1"));
-  ++i;
-  BOOST_CHECK_EQUAL(std::get<0>(*i), 20);
-  BOOST_CHECK_EQUAL(std::get<1>(*i), Name("test2"));
-  ++i;
-  BOOST_CHECK_EQUAL(std::get<0>(*i), 100);
-  BOOST_CHECK_EQUAL(std::get<1>(*i), Name("test3"));
-
-}
-
-BOOST_AUTO_TEST_CASE(DecodeInterestWithLink)
-{
-  Block interestBlock(InterestWithLink, sizeof(InterestWithLink));
-
-  ndn::Interest i;
-  BOOST_REQUIRE_NO_THROW(i.wireDecode(interestBlock));
-  Link link = i.getLink();
-  BOOST_CHECK_EQUAL(link.getName(), Name("/local/ndn/prefix"));
-  Link::DelegationSet delegations = link.getDelegations();
-
-  auto it = delegations.begin();
-  BOOST_CHECK_EQUAL(std::get<0>(*it), 10);
-  BOOST_CHECK_EQUAL(std::get<1>(*it), Name("local"));
-  ++it;
-  BOOST_CHECK_EQUAL(std::get<0>(*it), 20);
-  BOOST_CHECK_EQUAL(std::get<1>(*it), Name("ndn"));
-
-  BOOST_REQUIRE_NO_THROW(i.getSelectedDelegation());
-  BOOST_CHECK_EQUAL(i.getSelectedDelegation(), Name("local"));
-}
-
-BOOST_AUTO_TEST_CASE(DecodeInterestWithLinkNonDecreasingOrder)
-{
-  Block interestBlock(InterestWithLinkNonDecreasingOrder,
-                      sizeof(InterestWithLinkNonDecreasingOrder));
-
-  ndn::Interest i;
-  BOOST_REQUIRE_NO_THROW(i.wireDecode(interestBlock));
-  BOOST_REQUIRE_NO_THROW(i.getSelectedDelegation());
-  BOOST_CHECK_EQUAL(i.getSelectedDelegation(), Name("ndn"));
-}
-
-BOOST_AUTO_TEST_CASE(InterestContainingSelectedDelegationButNoLink)
-{
-  Block interestBlock(InterestWithSelectedDelegationButNoLink,
-                      sizeof(InterestWithSelectedDelegationButNoLink));
-
-  ndn::Interest i;
-  BOOST_CHECK_THROW(i.wireDecode(interestBlock), Interest::Error);
-}
-
-BOOST_AUTO_TEST_CASE(SelectedDelegationIsNotNonNegativeInteger)
-{
-  Block interestBlock(InterestWithLinkNotNonIntegerSelectedDelegation,
-                      sizeof(InterestWithLinkNotNonIntegerSelectedDelegation));
-
-  ndn::Interest i;
-  BOOST_CHECK_THROW(i.wireDecode(interestBlock), tlv::Error);
-}
-
-BOOST_AUTO_TEST_CASE(SelectedDelegationEqualToDelegationCount)
-{
-  Link link1("test", {{10, "/test1"}, {20, "/test2"}, {100, "/test3"}});
-  m_keyChain.sign(link1);
-  Block wire = link1.wireEncode();
-
-  Interest a;
-  a.setName("/Test/Encode/Decode/With/Link");
-  a.setChildSelector(1);
-  a.setNonce(100);
-  a.setInterestLifetime(time::seconds(10));
-  a.setLink(wire);
-  BOOST_CHECK_THROW(a.setSelectedDelegation(3), Interest::Error);
-}
-
-BOOST_AUTO_TEST_CASE(SelectedDelegationGreaterThanDelegationCount)
-{
-  Link link1("test", {{10, "/test1"}, {20, "/test2"}, {100, "/test3"}});
-  m_keyChain.sign(link1);
-  Block wire = link1.wireEncode();
-
-  Interest a;
-  a.setName("/Test/Encode/Decode/With/Link");
-  a.setChildSelector(1);
-  a.setNonce(100);
-  a.setInterestLifetime(time::seconds(10));
-  a.setLink(wire);
-  BOOST_CHECK_THROW(a.setSelectedDelegation(4), Interest::Error);
-}
-
-BOOST_AUTO_TEST_SUITE_END() // LinkSelectedDelegation
-
 BOOST_AUTO_TEST_SUITE_END() // TestInterest
 
 } // namespace tests
diff --git a/tests/unit-tests/make-interest-data.cpp b/tests/unit-tests/make-interest-data.cpp
index ab9c6ff..a497da2 100644
--- a/tests/unit-tests/make-interest-data.cpp
+++ b/tests/unit-tests/make-interest-data.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -52,14 +52,6 @@
   return data;
 }
 
-shared_ptr<Link>
-makeLink(const Name& name, std::initializer_list<std::pair<uint32_t, Name>> delegations)
-{
-  auto link = make_shared<Link>(name, delegations);
-  signData(link);
-  return link;
-}
-
 lp::Nack
 makeNack(const Interest& interest, lp::NackReason reason)
 {
diff --git a/tests/unit-tests/make-interest-data.hpp b/tests/unit-tests/make-interest-data.hpp
index 8dea8bf..eb208d1 100644
--- a/tests/unit-tests/make-interest-data.hpp
+++ b/tests/unit-tests/make-interest-data.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -59,13 +59,6 @@
   return data;
 }
 
-/** \brief create a Link object with fake signature
- *  \note Link may be modified afterwards without losing the fake signature.
- *        If a real signature is desired, sign again with KeyChain.
- */
-shared_ptr<Link>
-makeLink(const Name& name, std::initializer_list<std::pair<uint32_t, Name>> delegations);
-
 /** \brief create a Nack
  *  \param interest Interest
  *  \param reason Nack reason
