diff --git a/src/interest.cpp b/src/interest.cpp
index eb80c4b..304afcb 100644
--- a/src/interest.cpp
+++ b/src/interest.cpp
@@ -127,11 +127,8 @@
 
   // check prefix
   if (interestNameLength == fullNameLength) {
-    bool mightEndWithDigest = (interestNameLength > 0) &&
-                              (m_name.get(-1).value_size() == crypto::SHA256_DIGEST_SIZE);
-    if (mightEndWithDigest) {
-      // Interest Name is same length as Data full Name, last component could match digest
-      if (!m_name.isPrefixOf(data.getFullName()))
+    if (m_name.get(-1).isImplicitSha256Digest()) {
+      if (m_name != data.getFullName())
         return false;
     }
     else {
diff --git a/tests/unit-tests/test-interest.cpp b/tests/unit-tests/test-interest.cpp
index 4470674..04fc0be 100644
--- a/tests/unit-tests/test-interest.cpp
+++ b/tests/unit-tests/test-interest.cpp
@@ -530,7 +530,7 @@
   data7.wireEncode();
 
   interest = Interest()
-    .setName("/A/B/%D5H%DE%CE%FCK%88%07%20%DC%92W%A8%D8%15%E9%DFDe%E67B%EEU%C2%913%05%5D%AAg%C2");
+    .setName("/A/B/sha256digest=D548DECEFC4B880720DC9257A8D815E9DF4465E63742EE55C29133055DAA67C2");
   BOOST_CHECK_EQUAL(interest.matchesData(data7), true);
 
   interest = Interest()
@@ -539,8 +539,6 @@
   BOOST_CHECK_EQUAL(interest.matchesData(data7), false); // violates implicit digest
 }
 
-
-
 BOOST_AUTO_TEST_CASE(InterestFilterMatching)
 {
   BOOST_CHECK_EQUAL(InterestFilter("/a").doesMatch("/a/b"), true);
diff --git a/tests/unit-tests/util/test-in-memory-storage-common.cpp b/tests/unit-tests/util/test-in-memory-storage-common.cpp
index 1d2cfde..0ae051f 100644
--- a/tests/unit-tests/util/test-in-memory-storage-common.cpp
+++ b/tests/unit-tests/util/test-in-memory-storage-common.cpp
@@ -29,7 +29,6 @@
 #include "../test-make-interest-data.hpp"
 
 #include <boost/mpl/list.hpp>
-#include <boost/mpl/front.hpp>
 
 namespace ndn {
 namespace util {
@@ -384,13 +383,8 @@
   BOOST_CHECK_EQUAL(ims.size(), 6);
 }
 
-/// @todo Expected failures, needs to be fixed as part of Issue #2118
-BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(ImplicitDigestSelector, 1) // doesn't work with
-                                                                  // templated test cases
-// BOOST_AUTO_TEST_CASE_TEMPLATE(ImplicitDigestSelector, T, InMemoryStorages)
-BOOST_AUTO_TEST_CASE(ImplicitDigestSelector)
+BOOST_AUTO_TEST_CASE_TEMPLATE(ImplicitDigestSelector, T, InMemoryStorages)
 {
-  typedef boost::mpl::front<InMemoryStorages>::type T;
   T ims;
 
   Name name("/digest/works");
@@ -407,26 +401,23 @@
                                                     data->wireEncode().size());
 
   shared_ptr<Interest> interest = makeInterest("");
-  interest->setName(Name(name).append(digest1->buf(), digest1->size()));
+  interest->setName(Name(name).appendImplicitSha256Digest(digest1->buf(), digest1->size()));
   interest->setMinSuffixComponents(0);
   interest->setMaxSuffixComponents(0);
 
   shared_ptr<const Data> found = ims.find(*interest);
+  BOOST_REQUIRE(static_cast<bool>(found));
+  BOOST_CHECK_EQUAL(found->getName(), name);
+
+  shared_ptr<Interest> interest2 = makeInterest("");
+  uint8_t digest2[32] = {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+                         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
+  interest2->setName(Name(name).appendImplicitSha256Digest(digest2, 32));
+  interest2->setMinSuffixComponents(0);
+  interest2->setMaxSuffixComponents(0);
+
+  shared_ptr<const Data> notfound = ims.find(*interest2);
   BOOST_CHECK(static_cast<bool>(found));
-  // If changed to BOOST_REQUIRE, EXPECTED_FAILURES does not work
-  if (static_cast<bool>(found)) {
-    BOOST_CHECK_EQUAL(found->getName(), name);
-
-    shared_ptr<Interest> interest2 = makeInterest("");
-    uint8_t digest2[32] = {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-                           0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
-    interest2->setName(Name(name).append(digest2, 32));
-    interest2->setMinSuffixComponents(0);
-    interest2->setMaxSuffixComponents(0);
-
-    shared_ptr<const Data> notfound = ims.find(*interest2);
-    BOOST_CHECK(static_cast<bool>(found));
-  }
 }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(ChildSelector, T, InMemoryStorages)
@@ -536,13 +527,8 @@
   BOOST_CHECK_EQUAL(found->getName(), data2->getName());
 }
 
-/// @todo Expected failures, needs to be fixed as part of Issue #2118
-BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(MinMaxComponentsSelector, 1) // doesn't work with
-                                                                    // templated test cases
-// BOOST_AUTO_TEST_CASE_TEMPLATE(MinMaxComponentsSelector, T, InMemoryStorages)
-BOOST_AUTO_TEST_CASE(MinMaxComponentsSelector)
+BOOST_AUTO_TEST_CASE_TEMPLATE(MinMaxComponentsSelector, T, InMemoryStorages)
 {
-  typedef boost::mpl::front<InMemoryStorages>::type T;
   T ims;
 
   shared_ptr<Data> data = makeData("/a");
@@ -571,7 +557,7 @@
   interest->setChildSelector(0);
 
   shared_ptr<const Data> found = ims.find(*interest);
-  BOOST_CHECK_EQUAL(found->getName(), "/c/c/1/2/3/4/5/6");
+  BOOST_CHECK_EQUAL(found->getName(), "/c/c/1/2/3");
 
   shared_ptr<Interest> interest2 = makeInterest("/c/c");
   interest2->setMinSuffixComponents(4);
