interest: drop support for packet format v0.2

Interests are now always encoded into v0.3 format and decoding
from v0.2 format is no longer supported. Deprecated Exclude and
Selectors are completely removed.

Refs: #4567
Change-Id: I977a833253e63e28ac6eea85be0a7b449c76584a
diff --git a/tests/unit/exclude.t.cpp b/tests/unit/exclude.t.cpp
deleted file mode 100644
index d9e4379..0000000
--- a/tests/unit/exclude.t.cpp
+++ /dev/null
@@ -1,568 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2018 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 "ndn-cxx/exclude.hpp"
-#include "ndn-cxx/util/sha256.hpp"
-
-#include "tests/boost-test.hpp"
-
-#include <boost/lexical_cast.hpp>
-
-namespace ndn {
-namespace tests {
-
-BOOST_AUTO_TEST_SUITE(TestExclude)
-
-BOOST_AUTO_TEST_SUITE(GenericComponent) // exclude GenericNameComponent
-
-BOOST_AUTO_TEST_CASE(One)
-{
-  Exclude e;
-  std::vector<Exclude::Range> enumerated;
-
-  e.excludeOne(name::Component("b"));
-  BOOST_CHECK_EQUAL(e.toUri(), "b");
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].isSingular(), true);
-  BOOST_CHECK_EQUAL(enumerated[0].from, name::Component("b"));
-
-  e.excludeOne(name::Component("d"));
-  BOOST_CHECK_EQUAL(e.toUri(), "b,d");
-  BOOST_CHECK_EQUAL(e.size(), 2);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 2);
-  BOOST_CHECK_EQUAL(enumerated[0].isSingular(), true);
-  BOOST_CHECK_EQUAL(enumerated[0].from, name::Component("b"));
-  BOOST_CHECK_EQUAL(enumerated[1].isSingular(), true);
-  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("d"));
-
-  e.excludeOne(name::Component("a"));
-  BOOST_CHECK_EQUAL(e.toUri(), "a,b,d");
-  BOOST_CHECK_EQUAL(e.size(), 3);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 3);
-  BOOST_CHECK_EQUAL(enumerated[0].isSingular(), true);
-  BOOST_CHECK_EQUAL(enumerated[0].from, name::Component("a"));
-  BOOST_CHECK_EQUAL(enumerated[1].isSingular(), true);
-  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("b"));
-  BOOST_CHECK_EQUAL(enumerated[2].isSingular(), true);
-  BOOST_CHECK_EQUAL(enumerated[2].from, name::Component("d"));
-
-  e.excludeOne(name::Component("aa"));
-  BOOST_CHECK_EQUAL(e.toUri(), "a,b,d,aa");
-  BOOST_CHECK_EQUAL(e.size(), 4);
-
-  e.excludeOne(name::Component("cc"));
-  BOOST_CHECK_EQUAL(e.toUri(), "a,b,d,aa,cc");
-  BOOST_CHECK_EQUAL(e.size(), 5);
-
-  e.excludeOne(name::Component("c"));
-  BOOST_CHECK_EQUAL(e.toUri(), "a,b,c,d,aa,cc");
-  BOOST_CHECK_EQUAL(e.size(), 6);
-}
-
-BOOST_AUTO_TEST_CASE(Before)
-{
-  // based on https://redmine.named-data.net/issues/1158
-  ndn::Exclude e;
-  BOOST_REQUIRE_NO_THROW(e.excludeBefore(name::Component("PuQxMaf91")));
-
-  BOOST_CHECK_EQUAL(e.toUri(), "*,PuQxMaf91");
-}
-
-BOOST_AUTO_TEST_CASE(Ranges)
-{
-  // example: ANY /b /d ANY /f
-
-  Exclude e;
-  std::vector<Exclude::Range> enumerated;
-
-  e.excludeOne(name::Component("b0"));
-  BOOST_CHECK_EQUAL(e.toUri(), "b0");
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].isSingular(), true);
-  BOOST_CHECK_EQUAL(enumerated[0].from, name::Component("b0"));
-  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(enumerated[0]), "{b0}");
-  BOOST_CHECK_EQUAL(enumerated[0], (Exclude::Range{false, name::Component("b0"), false, name::Component("b0")}));
-  BOOST_CHECK_NE(enumerated[0], (Exclude::Range{false, name::Component("b0"), false, name::Component("b1")}));
-
-  e.excludeBefore(name::Component("b1"));
-  BOOST_CHECK_EQUAL(e.toUri(), "*,b1");
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("b1"));
-
-  e.excludeBefore(name::Component("c0"));
-  BOOST_CHECK_EQUAL(e.toUri(), "*,c0");
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("c0"));
-
-  e.excludeRange(name::Component("a0"), name::Component("c0"));
-  BOOST_CHECK_EQUAL(e.toUri(), "*,c0");
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("c0"));
-
-  e.excludeRange(name::Component("d0"), name::Component("e0"));
-  BOOST_CHECK_EQUAL(e.toUri(), "*,c0,d0,*,e0");
-  BOOST_CHECK_EQUAL(e.size(), 2);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 2);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("c0"));
-  BOOST_CHECK_EQUAL(enumerated[1].fromInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("d0"));
-  BOOST_CHECK_EQUAL(enumerated[1].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[1].to, name::Component("e0"));
-
-  e.excludeRange(name::Component("c1"), name::Component("d1"));
-  BOOST_CHECK_EQUAL(e.toUri(), "*,c0,c1,*,e0");
-  BOOST_CHECK_EQUAL(e.size(), 2);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 2);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("c0"));
-  BOOST_CHECK_EQUAL(enumerated[1].fromInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("c1"));
-  BOOST_CHECK_EQUAL(enumerated[1].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[1].to, name::Component("e0"));
-
-  e.excludeRange(name::Component("a1"), name::Component("d1"));
-  BOOST_CHECK_EQUAL(e.toUri(), "*,e0");
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("e0"));
-
-  e.excludeBefore(name::Component("e2"));
-  BOOST_CHECK_EQUAL(e.toUri(), "*,e2");
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("e2"));
-
-  e.excludeAfter(name::Component("f0"));
-  BOOST_CHECK_EQUAL(e.toUri(), "*,e2,f0,*");
-  BOOST_CHECK_EQUAL(e.size(), 2);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 2);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("e2"));
-  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(enumerated[0]), "(-∞,e2]");
-  BOOST_CHECK_EQUAL(enumerated[0], (Exclude::Range{true, name::Component("ignore"), false, name::Component("e2")}));
-  BOOST_CHECK_EQUAL(enumerated[1].fromInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("f0"));
-  BOOST_CHECK_EQUAL(enumerated[1].toInfinity, true);
-  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(enumerated[1]), "[f0,+∞)");
-  BOOST_CHECK_EQUAL(enumerated[1], (Exclude::Range{false, name::Component("f0"), true, name::Component("ignore")}));
-
-  e.excludeAfter(name::Component("e5"));
-  BOOST_CHECK_EQUAL(e.toUri(), "*,e2,e5,*");
-  BOOST_CHECK_EQUAL(e.size(), 2);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 2);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("e2"));
-  BOOST_CHECK_EQUAL(enumerated[1].fromInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("e5"));
-  BOOST_CHECK_EQUAL(enumerated[1].toInfinity, true);
-
-  e.excludeAfter(name::Component("b2"));
-  BOOST_CHECK_EQUAL(e.toUri(), "*");
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  enumerated.clear();
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, true);
-
-  BOOST_REQUIRE_THROW(e.excludeRange(name::Component("d0"), name::Component("a0")),
-                      Exclude::Error);
-}
-
-BOOST_AUTO_TEST_SUITE_END() // GenericComponent
-
-BOOST_AUTO_TEST_SUITE(ImplicitDigest) // exclude ImplicitSha256DigestComponent
-
-/** \brief make a name::Component with an octet repeated util::Sha256::DIGEST_SIZE times
- *  \param octet the octet to fill the component
- *  \param isDigest whether to make an ImplicitSha256DigestComponent or a GenericNameComponent
- *  \param lastOctet if non-negative, set the last octet to a different value
- */
-static name::Component
-makeComponent(uint8_t octet, bool isDigest, int lastOctet = -1)
-{
-  uint8_t wire[util::Sha256::DIGEST_SIZE];
-  std::memset(wire, octet, sizeof(wire));
-  if (lastOctet >= 0) {
-    wire[util::Sha256::DIGEST_SIZE - 1] = static_cast<uint8_t>(lastOctet);
-  }
-
-  if (isDigest) {
-    return name::Component::fromImplicitSha256Digest(wire, sizeof(wire));
-  }
-  else {
-    return name::Component(wire, sizeof(wire));
-  }
-}
-
-BOOST_AUTO_TEST_CASE(One)
-{
-  name::Component digestC = makeComponent(0xCC, true);;
-  name::Component genericC = makeComponent(0xCC, false);
-  name::Component digestD = makeComponent(0xDD, true);
-
-  Exclude e;
-  e.excludeOne(digestC);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestC), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(genericC), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestD), false);
-
-  e.clear();
-  e.excludeOne(genericC);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestC), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(genericC), true);
-}
-
-BOOST_AUTO_TEST_CASE(BeforeDigest)
-{
-  name::Component digestBA = makeComponent(0xBB, true, 0xBA);
-  name::Component digestBB = makeComponent(0xBB, true);
-  name::Component digestBC = makeComponent(0xBB, true, 0xBC);
-
-  Exclude e;
-  e.excludeBefore(digestBB);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestBA), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestBB), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestBC), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("")), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("generic")), false);
-
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  std::vector<Exclude::Range> enumerated;
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, digestBB);
-}
-
-BOOST_AUTO_TEST_CASE(BeforeGeneric)
-{
-  name::Component digest0 = makeComponent(0x00, true);
-  name::Component digest9 = makeComponent(0x99, true);
-  name::Component digestF = makeComponent(0xFF, true);
-
-  Exclude e;
-  e.excludeBefore(name::Component(""));
-  BOOST_CHECK_EQUAL(e.isExcluded(digest0), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(digest9), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestF), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("")), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("generic")), false);
-}
-
-BOOST_AUTO_TEST_CASE(AfterDigest)
-{
-  name::Component digestBA = makeComponent(0xBB, true, 0xBA);
-  name::Component digestBB = makeComponent(0xBB, true);
-  name::Component digestBC = makeComponent(0xBB, true, 0xBC);
-
-  Exclude e;
-  e.excludeAfter(digestBB);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestBA), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestBB), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestBC), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("")), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("generic")), true);
-
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  std::vector<Exclude::Range> enumerated;
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].from, digestBB);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, true);
-}
-
-BOOST_AUTO_TEST_CASE(AfterDigestFF)
-{
-  name::Component digest00 = makeComponent(0x00, true);
-  name::Component digest99 = makeComponent(0x99, true);
-  name::Component digestFE = makeComponent(0xFF, true, 0xFE);
-  name::Component digestFF = makeComponent(0xFF, true);
-
-  Exclude e;
-  e.excludeAfter(digestFF);
-  BOOST_CHECK_EQUAL(e.isExcluded(digest00), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(digest99), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestFE), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestFF), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("")), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("generic")), true);
-}
-
-BOOST_AUTO_TEST_CASE(AfterGeneric)
-{
-  name::Component digest0 = makeComponent(0x00, true);
-  name::Component digest9 = makeComponent(0x99, true);
-  name::Component digestF = makeComponent(0xFF, true);
-
-  Exclude e;
-  e.excludeAfter(name::Component(""));
-  BOOST_CHECK_EQUAL(e.isExcluded(digest0), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(digest9), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestF), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("")), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("generic")), true);
-}
-
-BOOST_AUTO_TEST_CASE(RangeDigest)
-{
-  name::Component digest0 = makeComponent(0x00, true);
-  name::Component digest7 = makeComponent(0x77, true);
-  name::Component digest8 = makeComponent(0x88, true);
-  name::Component digest9 = makeComponent(0x99, true);
-  name::Component digestF = makeComponent(0xFF, true);
-
-  Exclude e;
-  e.excludeRange(digest7, digest9);
-  BOOST_CHECK_EQUAL(e.isExcluded(digest0), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(digest7), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(digest8), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(digest9), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestF), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("")), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("generic")), false);
-}
-
-BOOST_AUTO_TEST_CASE(RangeDigestReverse)
-{
-  name::Component digest7 = makeComponent(0x77, true);
-  name::Component digest9 = makeComponent(0x99, true);
-
-  Exclude e;
-  BOOST_CHECK_THROW(e.excludeRange(digest9, digest7), Exclude::Error);
-}
-
-BOOST_AUTO_TEST_CASE(RangeDigestGeneric)
-{
-  name::Component digest0 = makeComponent(0x00, true);
-  name::Component digest7 = makeComponent(0x77, true);
-  name::Component digest9 = makeComponent(0x99, true);
-  name::Component digestF = makeComponent(0xFF, true);
-
-  Exclude e;
-  e.excludeRange(digest9, name::Component(""));
-  BOOST_CHECK_EQUAL(e.isExcluded(digest0), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(digest7), false);
-  BOOST_CHECK_EQUAL(e.isExcluded(digest9), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(digestF), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("")), true);
-  BOOST_CHECK_EQUAL(e.isExcluded(name::Component("generic")), false);
-
-  BOOST_CHECK_EQUAL(e.size(), 1);
-  std::vector<Exclude::Range> enumerated;
-  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
-  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
-  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].from, digest9);
-  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
-  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component(""));
-}
-
-BOOST_AUTO_TEST_CASE(RangeGenericDigest)
-{
-  name::Component digestF = makeComponent(0xFF, true);
-
-  Exclude e;
-  BOOST_CHECK_THROW(e.excludeRange(name::Component(""), digestF), Exclude::Error);
-}
-
-BOOST_AUTO_TEST_SUITE_END() // ImplicitDigest
-
-BOOST_AUTO_TEST_SUITE(WireCompare) // wireEncode, wireDecode, operator==, operator!=
-
-BOOST_AUTO_TEST_CASE(EqualityComparable)
-{
-  Exclude e1;
-  Exclude e2;
-  BOOST_CHECK_EQUAL(e1, e2);
-
-  e1.excludeOne(name::Component("T"));
-  BOOST_CHECK_NE(e1, e2);
-
-  e2.excludeOne(name::Component("D"));
-  BOOST_CHECK_NE(e1, e2);
-
-  e2.clear();
-  e2.excludeOne(name::Component("T"));
-  BOOST_CHECK_EQUAL(e1, e2);
-
-  e2.clear();
-  const uint8_t EXCLUDE[] = { 0x10, 0x15, 0x13, 0x00, 0x08, 0x01, 0x41, 0x08, 0x01, 0x42,
-                              0x08, 0x01, 0x43, 0x13, 0x00, 0x08, 0x01, 0x44, 0x08, 0x01,
-                              0x45, 0x13, 0x00 };
-  e2.wireDecode(Block(EXCLUDE, sizeof(EXCLUDE)));
-
-  e1.clear();
-  e1.excludeBefore(name::Component("A"));
-  e1.excludeOne(name::Component("B"));
-  e1.excludeRange(name::Component("C"), name::Component("D"));
-  e1.excludeAfter(name::Component("E"));
-  BOOST_CHECK_EQUAL(e1, e2);
-}
-
-BOOST_AUTO_TEST_CASE(Malformed)
-{
-  Exclude e1;
-  BOOST_CHECK_THROW(e1.wireEncode(), Exclude::Error);
-
-  Exclude e2;
-
-  // top-level TLV-TYPE is not tlv::Exclude
-  const uint8_t NON_EXCLUDE[] = { 0x01, 0x02, 0x13, 0x00 };
-  BOOST_CHECK_THROW(e2.wireDecode(Block(NON_EXCLUDE, sizeof(NON_EXCLUDE))),
-                    tlv::Error);
-
-  // Exclude element is empty
-  const uint8_t EMPTY_EXCLUDE[] = { 0x10, 0x00 };
-  BOOST_CHECK_THROW(e2.wireDecode(Block(EMPTY_EXCLUDE, sizeof(EMPTY_EXCLUDE))),
-                    Exclude::Error);
-
-  // Exclude element contains unknown element
-  const uint8_t UNKNOWN_COMP1[] = { 0x10, 0x02, 0xAA, 0x00 };
-  BOOST_CHECK_THROW(e2.wireDecode(Block(UNKNOWN_COMP1, sizeof(UNKNOWN_COMP1))),
-                    Exclude::Error);
-
-  // Exclude element contains unknown element
-  const uint8_t UNKNOWN_COMP2[] = { 0x10, 0x05, 0x08, 0x01, 0x54, 0xAA, 0x00 };
-  BOOST_CHECK_THROW(e2.wireDecode(Block(UNKNOWN_COMP2, sizeof(UNKNOWN_COMP2))),
-                    Exclude::Error);
-
-  // // <Exclude><Any/></Exclude>
-  // const uint8_t ONLY_ANY[] = { 0x10, 0x02, 0x13, 0x00 };
-  // BOOST_CHECK_THROW(e2.wireDecode(Block(ONLY_ANY, sizeof(ONLY_ANY))),
-  //                   Exclude::Error);
-
-  // <Exclude><Any/><Any/></Exclude>
-  const uint8_t ANY_ANY[] = { 0x10, 0x04, 0x13, 0x00, 0x13, 0x00 };
-  BOOST_CHECK_THROW(e2.wireDecode(Block(ANY_ANY, sizeof(ANY_ANY))),
-                                  Exclude::Error);
-
-  // // <Exclude><Any/><GenericNameComponent>T</GenericNameComponent><Any/></Exclude>
-  // const uint8_t ANY_COMPONENT_ANY[] = { 0x10, 0x07, 0x13, 0x00, 0x08, 0x01, 0x54, 0x13, 0x00 };
-  // BOOST_CHECK_THROW(e2.wireDecode(Block(ANY_COMPONENT_ANY, sizeof(ANY_COMPONENT_ANY))),
-  //                   Exclude::Error);
-
-  uint8_t WIRE[] = {
-    0x10, 0x20, // Exclude
-          0x01, 0x1E, // ImplicitSha256DigestComponent with incorrect length
-                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd
-  };
-
-  BOOST_CHECK_THROW(Exclude().wireDecode(Block(WIRE, sizeof(WIRE))), Exclude::Error);
-}
-
-BOOST_AUTO_TEST_CASE(ImplicitSha256Digest)
-{
-  uint8_t WIRE[] = {
-    0x10, 0x22, // Exclude
-          0x01, 0x20, // ImplicitSha256DigestComponent
-                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd
-  };
-
-  Block block(WIRE, sizeof(WIRE));
-
-  Exclude exclude;
-  BOOST_CHECK_NO_THROW(exclude.wireDecode(block));
-  BOOST_CHECK(exclude.wireEncode() == block);
-}
-
-BOOST_AUTO_TEST_CASE(EmptyComponent) // Bug #2660
-{
-  Exclude e1, e2;
-
-  e1.excludeOne(name::Component());
-  e2.excludeOne(name::Component(""));
-
-  BOOST_CHECK_EQUAL(e1, e2);
-  BOOST_CHECK_EQUAL(e1.toUri(), e2.toUri());
-  BOOST_CHECK(e1.wireEncode() == e2.wireEncode());
-
-  BOOST_CHECK_EQUAL("...", e1.toUri());
-
-  uint8_t WIRE[] {0x10, 0x02, 0x08, 0x00};
-  BOOST_CHECK_EQUAL_COLLECTIONS(e1.wireEncode().begin(), e1.wireEncode().end(),
-                                WIRE, WIRE + sizeof(WIRE));
-
-  Exclude e3(Block(WIRE, sizeof(WIRE)));
-  BOOST_CHECK_EQUAL(e1, e3);
-  BOOST_CHECK_EQUAL(e1.toUri(), e3.toUri());
-}
-
-BOOST_AUTO_TEST_SUITE_END() // WireCompare
-
-BOOST_AUTO_TEST_SUITE_END() // TestExclude
-
-} // namespace tests
-} // namespace ndn
diff --git a/tests/unit/interest.t.cpp b/tests/unit/interest.t.cpp
index 75aba88..ebbff4a 100644
--- a/tests/unit/interest.t.cpp
+++ b/tests/unit/interest.t.cpp
@@ -21,8 +21,6 @@
 
 #include "ndn-cxx/interest.hpp"
 #include "ndn-cxx/data.hpp"
-#include "ndn-cxx/security/digest-sha256.hpp"
-#include "ndn-cxx/security/signature-sha256-with-rsa.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/make-interest-data.hpp"
@@ -55,7 +53,6 @@
   Interest i;
   BOOST_CHECK_EQUAL(i.hasWire(), false);
   BOOST_CHECK_EQUAL(i.getName(), "/");
-  BOOST_CHECK_EQUAL(i.hasSelectors(), false);
   BOOST_CHECK_EQUAL(i.getCanBePrefix(), true);
   BOOST_CHECK_EQUAL(i.getMustBeFresh(), false);
   BOOST_CHECK_EQUAL(i.getForwardingHint().empty(), true);
@@ -67,12 +64,7 @@
   BOOST_CHECK_EQUAL(i.isParametersDigestValid(), true);
 }
 
-BOOST_AUTO_TEST_CASE(DecodeNotInterest)
-{
-  BOOST_CHECK_THROW(Interest("4202CAFE"_block), tlv::Error);
-}
-
-BOOST_AUTO_TEST_SUITE(EncodeDecode02)
+BOOST_AUTO_TEST_SUITE(Encode)
 
 BOOST_AUTO_TEST_CASE(Basic)
 {
@@ -83,149 +75,30 @@
                 0x08, 0x03, 0x6e, 0x64, 0x6e, // GenericNameComponent
                 0x08, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, // GenericNameComponent
           0x0a, 0x04, // Nonce
-                0x01, 0x00, 0x00, 0x00
+                0x01, 0x00, 0x00, 0x00,
   };
 
-  Interest i1("/local/ndn/prefix");
-  i1.setCanBePrefix(true);
+  Interest i1;
+  i1.setName("/local/ndn/prefix");
+  i1.setCanBePrefix(false);
   i1.setNonce(1);
+  BOOST_CHECK_EQUAL(i1.isParametersDigestValid(), true);
+
   Block wire1 = i1.wireEncode();
   BOOST_CHECK_EQUAL_COLLECTIONS(wire1.begin(), wire1.end(), WIRE, WIRE + sizeof(WIRE));
 
   Interest i2(wire1);
   BOOST_CHECK_EQUAL(i2.getName(), "/local/ndn/prefix");
-  BOOST_CHECK(i2.getSelectors().empty());
+  BOOST_CHECK_EQUAL(i2.getCanBePrefix(), false);
+  BOOST_CHECK_EQUAL(i2.getMustBeFresh(), false);
   BOOST_CHECK_EQUAL(i2.getForwardingHint().empty(), true);
   BOOST_CHECK_EQUAL(i2.getNonce(), 1);
   BOOST_CHECK_EQUAL(i2.getInterestLifetime(), DEFAULT_INTEREST_LIFETIME);
   BOOST_CHECK(i2.getHopLimit() == nullopt);
   BOOST_CHECK_EQUAL(i2.hasApplicationParameters(), false);
-  BOOST_CHECK_EQUAL(i2.isParametersDigestValid(), true);
+  BOOST_CHECK_EQUAL(i2.getApplicationParameters().isValid(), false);
 }
 
-BOOST_AUTO_TEST_CASE(Full)
-{
-  const uint8_t WIRE[] = {
-    0x05, 0x31, // Interest
-          0x07, 0x14, // Name
-                0x08, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, // GenericNameComponent
-                0x08, 0x03, 0x6e, 0x64, 0x6e, // GenericNameComponent
-                0x08, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, // GenericNameComponent
-          0x09, 0x03, // Selectors
-                0x0d, 0x01, 0x01,  // MinSuffixComponents
-          0x0a, 0x04, // Nonce
-                0x01, 0x00, 0x00, 0x00,
-          0x0c, 0x02, // InterestLifetime
-                0x03, 0xe8,
-          0x1e, 0x0a, // ForwardingHint
-                0x1f, 0x08, // Delegation
-                      0x1e, 0x01, 0x01, // Preference=1
-                      0x07, 0x03, 0x08, 0x01, 0x41 // Name=/A
-  };
-
-  Interest i1;
-  i1.setName("/local/ndn/prefix");
-  i1.setCanBePrefix(true);
-  i1.setMinSuffixComponents(1);
-  i1.setNonce(1);
-  i1.setInterestLifetime(1000_ms);
-  i1.setForwardingHint({{1, "/A"}});
-  Block wire1 = i1.wireEncode();
-  BOOST_CHECK_EQUAL_COLLECTIONS(wire1.begin(), wire1.end(), WIRE, WIRE + sizeof(WIRE));
-
-  Interest i2(wire1);
-  BOOST_CHECK_EQUAL(i2.getName(), "/local/ndn/prefix");
-  BOOST_CHECK_EQUAL(i2.getMinSuffixComponents(), 1);
-  BOOST_CHECK_EQUAL(i2.getForwardingHint(), DelegationList({{1, "/A"}}));
-  BOOST_CHECK_EQUAL(i2.getNonce(), 1);
-  BOOST_CHECK_EQUAL(i2.getInterestLifetime(), 1000_ms);
-  BOOST_CHECK(i2.getHopLimit() == nullopt);
-  BOOST_CHECK_EQUAL(i2.hasApplicationParameters(), false);
-  BOOST_CHECK_EQUAL(i2.isParametersDigestValid(), true);
-}
-
-BOOST_AUTO_TEST_CASE(ParametersSha256DigestComponent)
-{
-  const uint8_t WIRE[] = {
-    0x05, 0x60, // Interest
-          0x07, 0x58, // Name
-                0x08, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, // GenericNameComponent
-                0x08, 0x03, 0x6e, 0x64, 0x6e, // GenericNameComponent
-                0x08, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, // GenericNameComponent
-                0x02, 0x20, // ParametersSha256DigestComponent
-                      0xff, 0x91, 0x00, 0xe0, 0x4e, 0xaa, 0xdc, 0xf3, 0x06, 0x74, 0xd9, 0x80,
-                      0x26, 0xa0, 0x51, 0xba, 0x25, 0xf5, 0x6b, 0x69, 0xbf, 0xa0, 0x26, 0xdc,
-                      0xcc, 0xd7, 0x2c, 0x6e, 0xa0, 0xf7, 0x31, 0x5a,
-                0x02, 0x20, // ParametersSha256DigestComponent
-                      0xff, 0x91, 0x00, 0xe0, 0x4e, 0xaa, 0xdc, 0xf3, 0x06, 0x74, 0xd9, 0x80,
-                      0x26, 0xa0, 0x51, 0xba, 0x25, 0xf5, 0x6b, 0x69, 0xbf, 0xa0, 0x26, 0xdc,
-                      0xcc, 0xd7, 0x2c, 0x6e, 0xa0, 0xf7, 0x31, 0x5a,
-          0x0a, 0x04, // Nonce
-                0x01, 0x00, 0x00, 0x00,
-  };
-
-  Interest i1("/I");
-  BOOST_CHECK_THROW(i1.wireDecode(Block(WIRE, sizeof(WIRE))), tlv::Error);
-
-  // i1 is still in a valid state
-  BOOST_CHECK_EQUAL(i1.getName(), "/I");
-  BOOST_CHECK_EQUAL(i1.isParametersDigestValid(), true);
-
-  Interest i2("/I/params-sha256=f16db273f40436a852063f864d5072b01ead53151f5a688ea1560492bebedd05");
-  i2.setCanBePrefix(true);
-  i2.setNonce(2);
-  BOOST_CHECK_EQUAL(i2.isParametersDigestValid(), false);
-  // encoding in v0.2 format does not validate the ParametersSha256DigestComponent
-  Block wire2 = i2.wireEncode();
-  BOOST_CHECK_EQUAL(wire2, "052D 0725(080149 "
-                           "0220F16DB273F40436A852063F864D5072B01EAD53151F5A688EA1560492BEBEDD05) "
-                           "0A0402000000"_block);
-
-  // decoding from v0.2 format does not validate the ParametersSha256DigestComponent
-  Interest i3(wire2);
-  BOOST_CHECK_EQUAL(i3.getName(), i2.getName());
-  BOOST_CHECK_EQUAL(i3.isParametersDigestValid(), false);
-}
-
-BOOST_AUTO_TEST_SUITE_END() // EncodeDecode02
-
-BOOST_AUTO_TEST_SUITE(Encode03)
-
-// Enable after #4567
-//BOOST_AUTO_TEST_CASE(Basic)
-//{
-//  const uint8_t WIRE[] = {
-//    0x05, 0x1c, // Interest
-//          0x07, 0x14, // Name
-//                0x08, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, // GenericNameComponent
-//                0x08, 0x03, 0x6e, 0x64, 0x6e, // GenericNameComponent
-//                0x08, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, // GenericNameComponent
-//          0x0a, 0x04, // Nonce
-//                0x01, 0x00, 0x00, 0x00,
-//  };
-
-//  Interest i1;
-//  i1.setName("/local/ndn/prefix");
-//  i1.setCanBePrefix(false);
-//  i1.setNonce(1);
-//  BOOST_CHECK_EQUAL(i1.isParametersDigestValid(), true);
-
-//  Block wire1 = i1.wireEncode();
-//  BOOST_CHECK_EQUAL_COLLECTIONS(wire1.begin(), wire1.end(), WIRE, WIRE + sizeof(WIRE));
-
-//  Interest i2(wire1);
-//  BOOST_CHECK_EQUAL(i2.getName(), "/local/ndn/prefix");
-//  BOOST_CHECK_EQUAL(i2.getCanBePrefix(), false);
-//  BOOST_CHECK_EQUAL(i2.getMustBeFresh(), false);
-//  BOOST_CHECK_EQUAL(i2.getForwardingHint().empty(), true);
-//  BOOST_CHECK_EQUAL(i2.getNonce(), 1);
-//  BOOST_CHECK_EQUAL(i2.getInterestLifetime(), DEFAULT_INTEREST_LIFETIME);
-//  BOOST_CHECK(i2.getHopLimit() == nullopt);
-//  BOOST_CHECK_EQUAL(i2.hasApplicationParameters(), false);
-//  BOOST_CHECK_EQUAL(i2.getApplicationParameters().isValid(), false);
-//  BOOST_CHECK_EQUAL(i2.getPublisherPublicKeyLocator().empty(), true);
-//}
-
 BOOST_AUTO_TEST_CASE(WithParameters)
 {
   const uint8_t WIRE[] = {
@@ -265,7 +138,6 @@
   BOOST_CHECK(i2.getHopLimit() == nullopt);
   BOOST_CHECK_EQUAL(i2.hasApplicationParameters(), true);
   BOOST_CHECK_EQUAL(i2.getApplicationParameters(), "2404C0C1C2C3"_block);
-  BOOST_CHECK_EQUAL(i2.getPublisherPublicKeyLocator().empty(), true);
 }
 
 BOOST_AUTO_TEST_CASE(Full)
@@ -307,8 +179,6 @@
   i1.setInterestLifetime(30369_ms);
   i1.setHopLimit(220);
   i1.setApplicationParameters("2404C0C1C2C3"_block);
-  i1.setMinSuffixComponents(1); // v0.2-only elements will not be encoded
-  i1.setExclude(Exclude().excludeAfter(name::Component("J"))); // v0.2-only elements will not be encoded
   BOOST_CHECK_EQUAL(i1.isParametersDigestValid(), true);
 
   Block wire1 = i1.wireEncode();
@@ -325,19 +195,16 @@
   BOOST_CHECK_EQUAL(i2.getInterestLifetime(), 30369_ms);
   BOOST_CHECK_EQUAL(*i2.getHopLimit(), 220);
   BOOST_CHECK_EQUAL(i2.getApplicationParameters(), "2404C0C1C2C3"_block);
-  BOOST_CHECK_EQUAL(i2.getMinSuffixComponents(), -1); // Default because minSuffixComponents was not encoded
-  BOOST_CHECK_EQUAL(i2.getExclude().empty(), true); // Exclude was not encoded
 }
 
-// Enable after #4567
-//BOOST_AUTO_TEST_CASE(MissingApplicationParameters)
-//{
-//  Interest i;
-//  i.setName(Name("/A").appendParametersSha256DigestPlaceholder());
-//  i.setCanBePrefix(false);
-//  BOOST_CHECK_EQUAL(i.isParametersDigestValid(), false);
-//  BOOST_CHECK_THROW(i.wireEncode(), tlv::Error);
-//}
+BOOST_AUTO_TEST_CASE(MissingApplicationParameters)
+{
+  Interest i;
+  i.setName(Name("/A").appendParametersSha256DigestPlaceholder());
+  i.setCanBePrefix(false);
+  BOOST_CHECK_EQUAL(i.isParametersDigestValid(), false);
+  BOOST_CHECK_THROW(i.wireEncode(), tlv::Error);
+}
 
 BOOST_AUTO_TEST_CASE(MissingParametersSha256DigestComponent)
 {
@@ -353,12 +220,12 @@
   BOOST_CHECK_THROW(i.wireEncode(), tlv::Error); // now the check fails while attempting to reencode
 }
 
-BOOST_AUTO_TEST_SUITE_END() // Encode03
+BOOST_AUTO_TEST_SUITE_END() // Encode
 
-class Decode03Fixture
+class DecodeFixture
 {
 protected:
-  Decode03Fixture()
+  DecodeFixture()
   {
     // initialize all elements to non-empty, to verify wireDecode clears them
     i.setName("/A");
@@ -366,7 +233,6 @@
     i.setNonce(0x03d645a8);
     i.setInterestLifetime(18554_ms);
     i.setHopLimit(64);
-    i.setPublisherPublicKeyLocator(Name("/K"));
     i.setApplicationParameters("2404A0A1A2A3"_block);
   }
 
@@ -374,7 +240,12 @@
   Interest i;
 };
 
-BOOST_FIXTURE_TEST_SUITE(Decode03, Decode03Fixture)
+BOOST_FIXTURE_TEST_SUITE(Decode, DecodeFixture)
+
+BOOST_AUTO_TEST_CASE(NotAnInterest)
+{
+  BOOST_CHECK_THROW(i.wireDecode("4202CAFE"_block), tlv::Error);
+}
 
 BOOST_AUTO_TEST_CASE(NameOnly)
 {
@@ -386,15 +257,14 @@
   BOOST_CHECK_EQUAL(i.hasNonce(), true); // a random nonce is generated
   BOOST_CHECK_EQUAL(i.getInterestLifetime(), DEFAULT_INTEREST_LIFETIME);
   BOOST_CHECK(i.getHopLimit() == nullopt);
-  BOOST_CHECK_EQUAL(i.getPublisherPublicKeyLocator().empty(), true);
   BOOST_CHECK_EQUAL(i.hasApplicationParameters(), false);
   BOOST_CHECK_EQUAL(i.getApplicationParameters().isValid(), false);
 
   BOOST_CHECK(!i.hasWire()); // nonce generation resets wire encoding
 
-  // modify then re-encode as v0.2 format
+  // modify then re-encode
   i.setNonce(0x54657c95);
-  BOOST_CHECK_EQUAL(i.wireEncode(), "0510 0703(080149) 09030E0101 0A04957C6554"_block);
+  BOOST_CHECK_EQUAL(i.wireEncode(), "050B 0703(080149) 0A04957C6554"_block);
 }
 
 BOOST_AUTO_TEST_CASE(NameCanBePrefix)
@@ -430,7 +300,7 @@
   // encode without modification: retain original wire encoding
   BOOST_CHECK_EQUAL(i.wireEncode().value_size(), 49);
 
-  // modify then re-encode as v0.3 format: unrecognized elements are discarded
+  // modify then re-encode: unrecognized elements are discarded
   i.setName("/J");
   BOOST_CHECK_EQUAL(i.wireEncode(),
                     "0523 0703(08014A) "
@@ -458,8 +328,8 @@
   // encode without modification: retain original wire encoding
   BOOST_CHECK_EQUAL(i.wireEncode().value_size(), 91);
 
-  // modify then re-encode as v0.3 format: unrecognized elements
-  // after ApplicationParameters are preserved, the rest are discarded
+  // modify then re-encode: unrecognized elements after ApplicationParameters
+  //                        are preserved, the rest are discarded
   i.setName("/J");
   BOOST_CHECK_EQUAL(i.isParametersDigestValid(), true);
   BOOST_CHECK_EQUAL(i.wireEncode(),
@@ -598,9 +468,11 @@
 BOOST_AUTO_TEST_CASE(UnrecognizedCriticalElement)
 {
   BOOST_CHECK_THROW(i.wireDecode("0507 0703080149 FB00"_block), tlv::Error);
+  // v0.2 packet with Selectors
+  BOOST_CHECK_THROW(i.wireDecode("0507 0703080149 09030D0101 0A0401000000"_block), tlv::Error);
 }
 
-BOOST_AUTO_TEST_SUITE_END() // Decode03
+BOOST_AUTO_TEST_SUITE_END() // Decode
 
 BOOST_AUTO_TEST_CASE(MatchesData)
 {
@@ -691,10 +563,8 @@
   BOOST_CHECK_EQUAL(i.getCanBePrefix(), true);
   i.setCanBePrefix(false);
   BOOST_CHECK_EQUAL(i.getCanBePrefix(), false);
-  BOOST_CHECK_EQUAL(i.getSelectors().getMaxSuffixComponents(), 1);
   i.setCanBePrefix(true);
   BOOST_CHECK_EQUAL(i.getCanBePrefix(), true);
-  BOOST_CHECK_EQUAL(i.getSelectors().getMaxSuffixComponents(), -1);
 }
 
 BOOST_AUTO_TEST_CASE(SetMustBeFresh)
@@ -703,15 +573,13 @@
   BOOST_CHECK_EQUAL(i.getMustBeFresh(), false);
   i.setMustBeFresh(true);
   BOOST_CHECK_EQUAL(i.getMustBeFresh(), true);
-  BOOST_CHECK_EQUAL(i.getSelectors().getMustBeFresh(), true);
   i.setMustBeFresh(false);
   BOOST_CHECK_EQUAL(i.getMustBeFresh(), false);
-  BOOST_CHECK_EQUAL(i.getSelectors().getMustBeFresh(), false);
 }
 
 BOOST_AUTO_TEST_CASE(ModifyForwardingHint)
 {
-  Interest i;
+  Interest i("/I");
   i.setCanBePrefix(false);
   i.setForwardingHint({{1, "/A"}});
   i.wireEncode();
diff --git a/tests/unit/selectors.t.cpp b/tests/unit/selectors.t.cpp
deleted file mode 100644
index f64631c..0000000
--- a/tests/unit/selectors.t.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2018 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 "ndn-cxx/selectors.hpp"
-
-#include "tests/boost-test.hpp"
-
-namespace ndn {
-namespace tests {
-
-BOOST_AUTO_TEST_SUITE(TestSelectors)
-
-BOOST_AUTO_TEST_CASE(DefaultConstructor)
-{
-  Selectors s;
-  BOOST_CHECK(s.empty());
-  BOOST_CHECK_EQUAL(s.getMinSuffixComponents(), -1);
-  BOOST_CHECK_EQUAL(s.getMaxSuffixComponents(), -1);
-  BOOST_CHECK(s.getPublisherPublicKeyLocator().empty());
-  BOOST_CHECK(s.getExclude().empty());
-  BOOST_CHECK_EQUAL(s.getChildSelector(), 0);
-  BOOST_CHECK_EQUAL(s.getMustBeFresh(), false);
-}
-
-BOOST_AUTO_TEST_CASE(EncodeDecodeEmpty)
-{
-  const uint8_t WIRE[] = {
-    0x09, 0x00 // Selectors
-  };
-
-  Selectors s1;
-  Block wire1 = s1.wireEncode();
-  BOOST_CHECK_EQUAL_COLLECTIONS(wire1.begin(), wire1.end(), WIRE, WIRE + sizeof(WIRE));
-
-  Selectors s2(wire1);
-  BOOST_CHECK(s2.empty());
-  BOOST_CHECK_EQUAL(s2.getMinSuffixComponents(), -1);
-  BOOST_CHECK_EQUAL(s2.getMaxSuffixComponents(), -1);
-  BOOST_CHECK(s2.getPublisherPublicKeyLocator().empty());
-  BOOST_CHECK(s2.getExclude().empty());
-  BOOST_CHECK_EQUAL(s2.getChildSelector(), 0);
-  BOOST_CHECK_EQUAL(s2.getMustBeFresh(), false);
-
-  BOOST_CHECK(s1 == s2);
-}
-
-BOOST_AUTO_TEST_CASE(EncodeDecodeFull)
-{
-  const uint8_t WIRE[] = {
-    0x09, 0x39, // Selectors
-          0x0d, 0x01, 0x02, // MinSuffixComponents
-          0x0e, 0x01, 0x06,  // MaxSuffixComponent
-          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,
-          0x10, 0x14, // Exclude
-                0x08, 0x04, 0x61, 0x6c, 0x65, 0x78, // GenericNameComponent
-                0x08, 0x04, 0x78, 0x78, 0x78, 0x78, // GenericNameComponent
-                0x13, 0x00, // Any
-                0x08, 0x04, 0x79, 0x79, 0x79, 0x79, // GenericNameComponent
-          0x11, 0x01, 0x01, // ChildSelector
-          0x12, 0x00 // MustBeFresh
-  };
-
-  Selectors s1;
-  s1.setMinSuffixComponents(2);
-  s1.setMaxSuffixComponents(6);
-  s1.setPublisherPublicKeyLocator(KeyLocator("/test/key/locator"));
-  s1.setExclude(Exclude().excludeOne(name::Component("alex"))
-                .excludeRange(name::Component("xxxx"), name::Component("yyyy")));
-  s1.setChildSelector(1);
-  s1.setMustBeFresh(true);
-
-  Block wire1 = s1.wireEncode();
-  BOOST_CHECK_EQUAL_COLLECTIONS(wire1.begin(), wire1.end(), WIRE, WIRE + sizeof(WIRE));
-
-  Selectors s2(wire1);
-  BOOST_CHECK(!s2.empty());
-  BOOST_CHECK_EQUAL(s2.getMinSuffixComponents(), 2);
-  BOOST_CHECK_EQUAL(s2.getMaxSuffixComponents(), 6);
-  BOOST_CHECK_EQUAL(s2.getPublisherPublicKeyLocator().getType(), KeyLocator::KeyLocator_Name);
-  BOOST_CHECK_EQUAL(s2.getPublisherPublicKeyLocator().getName(), "ndn:/test/key/locator");
-  BOOST_CHECK_EQUAL(s2.getExclude().toUri(), "alex,xxxx,*,yyyy");
-  BOOST_CHECK_EQUAL(s2.getChildSelector(), 1);
-  BOOST_CHECK_EQUAL(s2.getMustBeFresh(), true);
-
-  BOOST_CHECK(s1 == s2);
-}
-
-BOOST_AUTO_TEST_CASE(SetChildSelector)
-{
-  Selectors s;
-  BOOST_CHECK_EQUAL(s.getChildSelector(), 0);
-  BOOST_CHECK_THROW(s.setChildSelector(-1), std::invalid_argument);
-  BOOST_CHECK_THROW(s.setChildSelector(2), std::invalid_argument);
-  s.setChildSelector(1);
-  BOOST_CHECK_EQUAL(s.getChildSelector(), 1);
-  s.setChildSelector(0);
-  BOOST_CHECK_EQUAL(s.getChildSelector(), 0);
-}
-
-BOOST_AUTO_TEST_CASE(Equality)
-{
-  // Selectors ::= SELECTORS-TYPE TLV-LENGTH
-  //                 MinSuffixComponents?
-  //                 MaxSuffixComponents?
-  //                 PublisherPublicKeyLocator?
-  //                 Exclude?
-  //                 ChildSelector?
-  //                 MustBeFresh?
-
-  Selectors a;
-  Selectors b;
-  BOOST_CHECK_EQUAL(a == b, true);
-  BOOST_CHECK_EQUAL(a != b, false);
-
-  // MinSuffixComponents
-  a.setMinSuffixComponents(1);
-  BOOST_CHECK_EQUAL(a == b, false);
-  BOOST_CHECK_EQUAL(a != b, true);
-
-  b.setMinSuffixComponents(2);
-  BOOST_CHECK_EQUAL(a == b, false);
-  BOOST_CHECK_EQUAL(a != b, true);
-
-  b.setMinSuffixComponents(1);
-  BOOST_CHECK_EQUAL(a == b, true);
-  BOOST_CHECK_EQUAL(a != b, false);
-
-  // MaxSuffixComponents
-  a.setMaxSuffixComponents(10);
-  BOOST_CHECK_EQUAL(a == b, false);
-  BOOST_CHECK_EQUAL(a != b, true);
-
-  b.setMaxSuffixComponents(10);
-  BOOST_CHECK_EQUAL(a == b, true);
-  BOOST_CHECK_EQUAL(a != b, false);
-
-  // PublisherPublicKeyLocator
-  a.setPublisherPublicKeyLocator(KeyLocator("/key/Locator/name"));
-  BOOST_CHECK_EQUAL(a == b, false);
-  BOOST_CHECK_EQUAL(a != b, true);
-
-  b.setPublisherPublicKeyLocator(KeyLocator("/key/Locator/name"));
-  BOOST_CHECK_EQUAL(a == b, true);
-  BOOST_CHECK_EQUAL(a != b, false);
-
-  // Exclude
-  a.setExclude(Exclude().excludeOne(name::Component("exclude")));
-  BOOST_CHECK_EQUAL(a == b, false);
-  BOOST_CHECK_EQUAL(a != b, true);
-
-  b.setExclude(Exclude().excludeOne(name::Component("exclude")));
-  BOOST_CHECK_EQUAL(a == b, true);
-  BOOST_CHECK_EQUAL(a != b, false);
-
-  // ChildSelector
-  a.setChildSelector(1);
-  BOOST_CHECK_EQUAL(a == b, false);
-  BOOST_CHECK_EQUAL(a != b, true);
-
-  b.setChildSelector(1);
-  BOOST_CHECK_EQUAL(a == b, true);
-  BOOST_CHECK_EQUAL(a != b, false);
-
-  // MustBeFresh
-  a.setMustBeFresh(true);
-  BOOST_CHECK_EQUAL(a == b, false);
-  BOOST_CHECK_EQUAL(a != b, true);
-
-  b.setMustBeFresh(true);
-  BOOST_CHECK_EQUAL(a == b, true);
-  BOOST_CHECK_EQUAL(a != b, false);
-}
-
-BOOST_AUTO_TEST_SUITE_END() // TestSelectors
-
-} // namespace tests
-} // namespace ndn