interest: add Interest::modifyForwardingHint

refs #4055

Change-Id: I3e245bcb5091659e0e9d89b18de604e42c906694
diff --git a/tests/unit-tests/interest.t.cpp b/tests/unit-tests/interest.t.cpp
index f2a7745..d0345a4 100644
--- a/tests/unit-tests/interest.t.cpp
+++ b/tests/unit-tests/interest.t.cpp
@@ -355,6 +355,18 @@
   BOOST_CHECK_EQUAL(i.getInterestLifetime(), time::milliseconds(1));
 }
 
+BOOST_AUTO_TEST_CASE(ModifyForwardingHint)
+{
+  Interest i;
+  i.setForwardingHint({{1, "/A"}});
+  i.wireEncode();
+  BOOST_CHECK(i.hasWire());
+
+  i.modifyForwardingHint([] (DelegationList& fh) { fh.insert(2, "/B"); });
+  BOOST_CHECK(!i.hasWire());
+  BOOST_CHECK_EQUAL(i.getForwardingHint(), DelegationList({{1, "/A"}, {2, "/B"}}));
+}
+
 // ---- operators ----
 
 BOOST_AUTO_TEST_CASE(Equality)