interest: declare default CanBePrefix setting

refs #4581

Change-Id: I82de3b13c3010242fa7999a2564d4a5442dfd14b
diff --git a/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp b/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
index a819279..2f90302 100644
--- a/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
+++ b/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
@@ -25,6 +25,7 @@
 
 #include "boost-test.hpp"
 #include "../identity-management-time-fixture.hpp"
+#include "make-interest-data.hpp"
 
 namespace ndn {
 namespace security {
@@ -124,21 +125,21 @@
 {
   Identity identity = addIdentity("/SecurityTestSignatureSha256WithEcdsa/InterestSignature", EcKeyParams());
 
-  Interest interest("/SecurityTestSignatureSha256WithEcdsa/InterestSignature/Interest1");
-  Interest interest11("/SecurityTestSignatureSha256WithEcdsa/InterestSignature/Interest1");
+  auto interest = makeInterest("/SecurityTestSignatureSha256WithEcdsa/InterestSignature/Interest1");
+  auto interest11 = makeInterest("/SecurityTestSignatureSha256WithEcdsa/InterestSignature/Interest1");
 
   scheduler.scheduleEvent(100_ms, [&] {
-      BOOST_CHECK_NO_THROW(m_keyChain.sign(interest, security::SigningInfo(identity)));
+      m_keyChain.sign(*interest, security::SigningInfo(identity));
     });
 
   advanceClocks(100_ms);
   scheduler.scheduleEvent(100_ms, [&] {
-      BOOST_CHECK_NO_THROW(m_keyChain.sign(interest11, security::SigningInfo(identity)));
+      m_keyChain.sign(*interest11, security::SigningInfo(identity));
     });
 
   advanceClocks(100_ms);
 
-  Block interestBlock(interest.wireEncode().wire(), interest.wireEncode().size());
+  Block interestBlock(interest->wireEncode().wire(), interest->wireEncode().size());
 
   Interest interest2;
   interest2.wireDecode(interestBlock);
diff --git a/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp b/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
index 86dbb37..7de3774 100644
--- a/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
+++ b/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
@@ -25,6 +25,7 @@
 
 #include "boost-test.hpp"
 #include "../identity-management-time-fixture.hpp"
+#include "make-interest-data.hpp"
 
 namespace ndn {
 namespace security {
@@ -129,21 +130,21 @@
 {
   Identity identity = addIdentity("/SecurityTestSignatureSha256WithRsa/InterestSignature", RsaKeyParams());
 
-  Interest interest("/SecurityTestSignatureSha256WithRsa/InterestSignature/Interest1");
-  Interest interest11("/SecurityTestSignatureSha256WithRsa/InterestSignature/Interest1");
+  auto interest = makeInterest("/SecurityTestSignatureSha256WithRsa/InterestSignature/Interest1");
+  auto interest11 = makeInterest("/SecurityTestSignatureSha256WithRsa/InterestSignature/Interest1");
 
   scheduler.scheduleEvent(100_ms, [&] {
-      BOOST_CHECK_NO_THROW(m_keyChain.sign(interest, security::SigningInfo(identity)));
+      m_keyChain.sign(*interest, security::SigningInfo(identity));
     });
 
   advanceClocks(100_ms);
   scheduler.scheduleEvent(100_ms, [&] {
-      BOOST_CHECK_NO_THROW(m_keyChain.sign(interest11, security::SigningInfo(identity)));
+      m_keyChain.sign(*interest11, security::SigningInfo(identity));
     });
 
   advanceClocks(100_ms);
 
-  Block interestBlock(interest.wireEncode().wire(), interest.wireEncode().size());
+  Block interestBlock(interest->wireEncode().wire(), interest->wireEncode().size());
 
   Interest interest2;
   interest2.wireDecode(interestBlock);