diff --git a/docs/examples.rst b/docs/examples.rst
index a778b25..a2a0a0c 100644
--- a/docs/examples.rst
+++ b/docs/examples.rst
@@ -41,7 +41,7 @@
 .. literalinclude:: ../examples/producer.cpp
    :language: c++
    :linenos:
-   :emphasize-lines: 39-42,55,62-64,79,87,91
+   :emphasize-lines: 39-42,55,60-63,78,86,90
 
 Consumer that uses Scheduler
 ----------------------------
diff --git a/examples/producer.cpp b/examples/producer.cpp
index 2456280..8ba7088 100644
--- a/examples/producer.cpp
+++ b/examples/producer.cpp
@@ -60,9 +60,7 @@
     auto data = std::make_shared<Data>();
     data->setName(interest.getName());
     data->setFreshnessPeriod(10_s);
-
-    constexpr std::string_view content{"Hello, world!"};
-    data->setContent({reinterpret_cast<const uint8_t*>(content.data()), content.size()});
+    data->setContent("Hello, world!");
 
     // In order for the consumer application to be able to validate the packet, you need to setup
     // the following keys:
diff --git a/ndn-cxx/data.cpp b/ndn-cxx/data.cpp
index 4391d35..2e45a83 100644
--- a/ndn-cxx/data.cpp
+++ b/ndn-cxx/data.cpp
@@ -262,10 +262,18 @@
 }
 
 Data&
+Data::setContent(std::string_view value)
+{
+  m_content = makeStringBlock(tlv::Content, value);
+  resetWire();
+  return *this;
+}
+
+Data&
 Data::setContent(ConstBufferPtr value)
 {
-  if (value == nullptr) {
-    NDN_THROW(std::invalid_argument("Content buffer cannot be nullptr"));
+  if (!value) {
+    NDN_THROW(std::invalid_argument("Content buffer cannot be null"));
   }
 
   m_content = Block(tlv::Content, std::move(value));
@@ -276,8 +284,10 @@
 Data&
 Data::unsetContent()
 {
-  m_content = {};
-  resetWire();
+  if (m_content.isValid()) {
+    m_content = {};
+    resetWire();
+  }
   return *this;
 }
 
@@ -300,8 +310,8 @@
 Data&
 Data::setSignatureValue(ConstBufferPtr value)
 {
-  if (value == nullptr) {
-    NDN_THROW(std::invalid_argument("SignatureValue buffer cannot be nullptr"));
+  if (!value) {
+    NDN_THROW(std::invalid_argument("SignatureValue buffer cannot be null"));
   }
 
   m_signatureValue = Block(tlv::SignatureValue, std::move(value));
diff --git a/ndn-cxx/data.hpp b/ndn-cxx/data.hpp
index 5467e49..ac8ef0a 100644
--- a/ndn-cxx/data.hpp
+++ b/ndn-cxx/data.hpp
@@ -95,18 +95,21 @@
   const Block&
   wireEncode(EncodingBuffer& encoder, span<const uint8_t> signature) const;
 
-  /** @brief Encode into a Block.
-   *  @pre Data must be signed.
+  /**
+   * @brief Encode into a Block.
+   * @pre Data must be signed.
    */
   const Block&
   wireEncode() const;
 
-  /** @brief Decode from @p wire.
+  /**
+   * @brief Decode from @p wire.
    */
   void
   wireDecode(const Block& wire);
 
-  /** @brief Check if this instance has cached wire encoding.
+  /**
+   * @brief Check if this instance has cached wire encoding.
    */
   bool
   hasWire() const noexcept
@@ -114,16 +117,17 @@
     return m_wire.hasWire();
   }
 
-  /** @brief Get full name including implicit digest
-   *  @pre hasWire() == true; i.e. wireEncode() must have been called
-   *  @throw Error Data has no wire encoding
+  /**
+   * @brief Get the full name (including implicit digest).
+   * @pre hasWire() == true, i.e., wireEncode() must have been called.
+   * @throw Error Data has no wire encoding
    */
   const Name&
   getFullName() const;
 
 public: // Data fields
   /**
-   * @brief Get the data name.
+   * @brief Get the %Data name.
    */
   const Name&
   getName() const noexcept
@@ -132,7 +136,7 @@
   }
 
   /**
-   * @brief Set the data name.
+   * @brief Set the %Data name.
    * @return A reference to this Data, to allow chaining.
    */
   Data&
@@ -202,13 +206,24 @@
   setContent(span<const uint8_t> value);
 
   /**
+   * @brief Set `Content` by copying from a string.
+   * @param value string with the TLV-VALUE of the content
+   * @return A reference to this Data, to allow chaining.
+   */
+  Data&
+  setContent(std::string_view value);
+
+  /**
    * @brief Set `Content` from a shared buffer.
-   * @param value buffer with the TLV-VALUE of the content; must not be nullptr
+   * @param value buffer with the TLV-VALUE of the content; must not be null
    * @return A reference to this Data, to allow chaining.
    */
   Data&
   setContent(ConstBufferPtr value);
 
+  Data&
+  setContent(std::nullptr_t) = delete;
+
   /**
    * @brief Remove the `Content` element.
    * @return A reference to this Data, to allow chaining.
@@ -226,14 +241,15 @@
     return m_signatureInfo;
   }
 
-  /** @brief Set the `SignatureInfo` element.
+  /**
+   * @brief Set the `SignatureInfo` element.
    *
-   *  This is a low-level function that should not normally be called directly by applications.
-   *  Instead, provide a SignatureInfo to the SigningInfo object passed to KeyChain::sign().
+   * This is a low-level function that should not normally be called directly by applications.
+   * Instead, provide a SignatureInfo to the SigningInfo object passed to KeyChain::sign().
    *
-   *  @return A reference to this Data, to allow chaining.
-   *  @warning SignatureInfo is overwritten when the packet is signed via KeyChain::sign().
-   *  @sa SigningInfo
+   * @return A reference to this Data, to allow chaining.
+   * @warning SignatureInfo is overwritten when the packet is signed via KeyChain::sign().
+   * @sa SigningInfo
    */
   Data&
   setSignatureInfo(const SignatureInfo& info);
@@ -262,7 +278,7 @@
 
   /**
    * @brief Set `SignatureValue` from a shared buffer.
-   * @param value buffer containing the TLV-VALUE of the SignatureValue; must not be nullptr
+   * @param value buffer containing the TLV-VALUE of the SignatureValue; must not be null
    * @return A reference to this Data, to allow chaining.
    *
    * This is a low-level function that should not normally be called directly by applications.
@@ -273,11 +289,15 @@
   Data&
   setSignatureValue(ConstBufferPtr value);
 
-  /** @brief Extract ranges of Data covered by the signature.
-   *  @throw Error Data cannot be encoded or is missing ranges necessary for signing
-   *  @warning The returned pointers will be invalidated if wireDecode() or wireEncode() are called.
+  Data&
+  setSignatureValue(std::nullptr_t) = delete;
+
+  /**
+   * @brief Extract ranges of Data covered by the signature.
+   * @throw Error Data cannot be encoded or is missing ranges necessary for signing
+   * @warning The returned pointers will be invalidated if wireDecode() or wireEncode() are called.
    */
-  InputBuffers
+  [[nodiscard]] InputBuffers
   extractSignedRanges() const;
 
 public: // MetaInfo fields
@@ -332,8 +352,9 @@
   }
 
 protected:
-  /** @brief Clear wire encoding and cached FullName
-   *  @note This does not clear the SignatureValue.
+  /**
+   * @brief Clear wire encoding and cached FullName.
+   * @note This does not clear the SignatureValue.
    */
   void
   resetWire();
diff --git a/ndn-cxx/interest.cpp b/ndn-cxx/interest.cpp
index f5b1ea3..3c23562 100644
--- a/ndn-cxx/interest.cpp
+++ b/ndn-cxx/interest.cpp
@@ -377,6 +377,26 @@
 }
 
 Interest&
+Interest::setCanBePrefix(bool canBePrefix)
+{
+  if (canBePrefix != m_canBePrefix) {
+    m_canBePrefix = canBePrefix;
+    m_wire.reset();
+  }
+  return *this;
+}
+
+Interest&
+Interest::setMustBeFresh(bool mustBeFresh)
+{
+  if (mustBeFresh != m_mustBeFresh) {
+    m_mustBeFresh = mustBeFresh;
+    m_wire.reset();
+  }
+  return *this;
+}
+
+Interest&
 Interest::setForwardingHint(std::vector<Name> value)
 {
   m_forwardingHint = std::move(value);
@@ -384,7 +404,7 @@
   return *this;
 }
 
-static auto
+[[nodiscard]] static auto
 generateNonce()
 {
   uint32_t r = random::generateWord32();
@@ -489,10 +509,16 @@
 }
 
 Interest&
+Interest::setApplicationParameters(std::string_view value)
+{
+  return setApplicationParametersInternal(makeStringBlock(tlv::ApplicationParameters, value));
+}
+
+Interest&
 Interest::setApplicationParameters(ConstBufferPtr value)
 {
-  if (value == nullptr) {
-    NDN_THROW(std::invalid_argument("ApplicationParameters buffer cannot be nullptr"));
+  if (!value) {
+    NDN_THROW(std::invalid_argument("ApplicationParameters buffer cannot be null"));
   }
 
   return setApplicationParametersInternal({tlv::ApplicationParameters, std::move(value)});
@@ -618,8 +644,8 @@
 Interest&
 Interest::setSignatureValue(ConstBufferPtr value)
 {
-  if (value == nullptr) {
-    NDN_THROW(std::invalid_argument("InterestSignatureValue buffer cannot be nullptr"));
+  if (!value) {
+    NDN_THROW(std::invalid_argument("InterestSignatureValue buffer cannot be null"));
   }
 
   return setSignatureValueInternal({tlv::InterestSignatureValue, std::move(value)});
diff --git a/ndn-cxx/interest.hpp b/ndn-cxx/interest.hpp
index dff5f39..5ca7924 100644
--- a/ndn-cxx/interest.hpp
+++ b/ndn-cxx/interest.hpp
@@ -71,10 +71,10 @@
 
     Nonce(uint8_t n1, uint8_t n2, uint8_t n3, uint8_t n4) noexcept
     {
-      data()[0] = n1;
-      data()[1] = n2;
-      data()[2] = n3;
-      data()[3] = n4;
+      (*this)[0] = n1;
+      (*this)[1] = n2;
+      (*this)[2] = n3;
+      (*this)[3] = n4;
     }
 
   private: // non-member operators
@@ -153,22 +153,27 @@
   toUri() const;
 
 public: // matching
-  /** @brief Check if Interest can be satisfied by @p data.
+  /**
+   * @brief Check if this Interest can be satisfied by @p data.
    *
-   *  This method considers Name, CanBePrefix, and MustBeFresh. However, MustBeFresh processing
-   *  is limited to rejecting Data with zero/omitted FreshnessPeriod.
+   * This method considers `Name`, `CanBePrefix`, and `MustBeFresh`. However, `MustBeFresh`
+   * evaluation is limited to rejecting Data with zero/omitted `FreshnessPeriod`.
    */
-  bool
+  [[nodiscard]] bool
   matchesData(const Data& data) const;
 
-  /** @brief Check if this Interest matches @p other
+  /**
+   * @brief Check if this Interest matches @p other.
    *
-   *  Two Interests match if both have the same Name, CanBePrefix, and MustBeFresh.
+   * Two Interests match if they have the same `Name`, `CanBePrefix`, and `MustBeFresh`.
    */
-  bool
+  [[nodiscard]] bool
   matchesInterest(const Interest& other) const;
 
-public: // element access
+public: // Interest fields
+  /**
+   * @brief Get the %Interest name.
+   */
   const Name&
   getName() const noexcept
   {
@@ -176,8 +181,8 @@
   }
 
   /**
-   * @brief Set the %Interest's name.
-   * @throw std::invalid_argument @p name is invalid
+   * @brief Set the %Interest name.
+   * @throw std::invalid_argument @p name is not a valid %Interest name
    */
   Interest&
   setName(const Name& name);
@@ -196,12 +201,7 @@
    * @param canBePrefix Whether the element should be present.
    */
   Interest&
-  setCanBePrefix(bool canBePrefix)
-  {
-    m_canBePrefix = canBePrefix;
-    m_wire.reset();
-    return *this;
-  }
+  setCanBePrefix(bool canBePrefix);
 
   /**
    * @brief Check whether the `MustBeFresh` element is present.
@@ -217,19 +217,22 @@
    * @param mustBeFresh Whether the element should be present.
    */
   Interest&
-  setMustBeFresh(bool mustBeFresh)
-  {
-    m_mustBeFresh = mustBeFresh;
-    m_wire.reset();
-    return *this;
-  }
+  setMustBeFresh(bool mustBeFresh);
 
+  /**
+   * @brief Get the delegations (names) in the `ForwardingHint`.
+   */
   span<const Name>
   getForwardingHint() const noexcept
   {
     return m_forwardingHint;
   }
 
+  /**
+   * @brief Set the `ForwardingHint` delegations (names).
+   *
+   * To completely remove the `ForwardingHint` element from the Interest, pass an empty vector.
+   */
   Interest&
   setForwardingHint(std::vector<Name> value);
 
@@ -253,7 +256,7 @@
   /**
    * @brief Set the %Interest's nonce.
    *
-   * Use `setNonce(nullopt)` to remove any nonce from the Interest.
+   * Use `setNonce(std::nullopt)` to remove any nonce from the Interest.
    */
   Interest&
   setNonce(std::optional<Nonce> nonce);
@@ -295,7 +298,7 @@
   /**
    * @brief Set the %Interest's hop limit.
    *
-   * Use `setHopLimit(nullopt)` to remove any hop limit from the Interest.
+   * Use `setHopLimit(std::nullopt)` to remove any hop limit from the Interest.
    */
   Interest&
   setHopLimit(std::optional<uint8_t> hopLimit);
@@ -354,8 +357,20 @@
   setApplicationParameters(span<const uint8_t> value);
 
   /**
+   * @brief Set `ApplicationParameters` by copying from a string.
+   * @param value string from which the TLV-VALUE of the parameters will be copied
+   * @return A reference to this Interest.
+   *
+   * This function will also recompute the value of the ParametersSha256DigestComponent in the
+   * Interest's name. If the name does not contain a ParametersSha256DigestComponent, one will
+   * be appended to it.
+   */
+  Interest&
+  setApplicationParameters(std::string_view value);
+
+  /**
    * @brief Set `ApplicationParameters` from a shared buffer.
-   * @param value buffer containing the TLV-VALUE of the parameters; must not be nullptr
+   * @param value buffer containing the TLV-VALUE of the parameters; must not be null
    * @return A reference to this Interest.
    *
    * This function will also recompute the value of the ParametersSha256DigestComponent in the
@@ -365,6 +380,9 @@
   Interest&
   setApplicationParameters(ConstBufferPtr value);
 
+  Interest&
+  setApplicationParameters(std::nullptr_t) = delete;
+
   /**
    * @brief Remove the `ApplicationParameters` element from this Interest.
    * @return A reference to this Interest.
@@ -386,7 +404,6 @@
 
   /**
    * @brief Get the `InterestSignatureInfo` element.
-   * @retval nullopt The element is not present.
    */
   std::optional<SignatureInfo>
   getSignatureInfo() const;
@@ -418,7 +435,7 @@
 
   /**
    * @brief Set `InterestSignatureValue` from a shared buffer.
-   * @param value buffer containing the TLV-VALUE of the InterestSignatureValue; must not be nullptr
+   * @param value buffer containing the TLV-VALUE of the InterestSignatureValue; must not be null
    * @return A reference to this Interest.
    * @throw Error InterestSignatureInfo is unset
    *
@@ -427,11 +444,15 @@
   Interest&
   setSignatureValue(ConstBufferPtr value);
 
-  /** @brief Extract ranges of Interest covered by the signature in Packet Specification v0.3
-   *  @throw Error Interest cannot be encoded or is missing ranges necessary for signing
-   *  @warning The returned pointers will be invalidated if wireDecode() or wireEncode() are called.
+  Interest&
+  setSignatureValue(std::nullptr_t) = delete;
+
+  /**
+   * @brief Extract ranges of Interest covered by the signature.
+   * @throw Error Interest cannot be encoded or is missing ranges necessary for signing
+   * @warning The returned pointers will be invalidated if wireDecode() or wireEncode() are called.
    */
-  InputBuffers
+  [[nodiscard]] InputBuffers
   extractSignedRanges() const;
 
 public: // ParametersSha256DigestComponent support
@@ -447,12 +468,13 @@
     s_autoCheckParametersDigest = b;
   }
 
-  /** @brief Check if the ParametersSha256DigestComponent in the name is valid.
+  /**
+   * @brief Check if the ParametersSha256DigestComponent in the name is valid.
    *
-   *  Returns true if there is a single ParametersSha256DigestComponent in the name and the digest
-   *  value is correct, or if there is no ParametersSha256DigestComponent in the name and the
-   *  Interest does not contain any parameters.
-   *  Returns false otherwise.
+   * Returns true if there is a single ParametersSha256DigestComponent in the name and the digest
+   * value is correct, or if there is no ParametersSha256DigestComponent in the name and the
+   * Interest does not contain any parameters.
+   * Returns false otherwise.
    */
   bool
   isParametersDigestValid() const;
diff --git a/ndn-cxx/link.cpp b/ndn-cxx/link.cpp
index 976a722..d3e28b5 100644
--- a/ndn-cxx/link.cpp
+++ b/ndn-cxx/link.cpp
@@ -43,13 +43,7 @@
 Link::encodeContent()
 {
   setContentType(tlv::ContentType_Link);
-
-  if (m_delegations.empty()) {
-    setContent(span<uint8_t>{});
-  }
-  else {
-    setContent(makeNestedBlock(tlv::Content, m_delegations.begin(), m_delegations.end()));
-  }
+  setContent(makeNestedBlock(tlv::Content, m_delegations.begin(), m_delegations.end()));
 }
 
 void
diff --git a/tests/unit/data.t.cpp b/tests/unit/data.t.cpp
index 4672a83..cb7de5b 100644
--- a/tests/unit/data.t.cpp
+++ b/tests/unit/data.t.cpp
@@ -168,7 +168,7 @@
 {
   Data d;
   BOOST_CHECK_EXCEPTION(d.wireEncode(), tlv::Error, [] (const auto& e) {
-    return e.what() == "Requested wire format, but Data has not been signed"s;
+    return e.what() == "Requested wire format, but Data has not been signed"sv;
   });
 }
 
@@ -239,7 +239,7 @@
 BOOST_AUTO_TEST_CASE(NotData)
 {
   BOOST_CHECK_EXCEPTION(d.wireDecode("4202CAFE"_block), tlv::Error, [] (const auto& e) {
-    return e.what() == "Expecting Data element, but TLV has type 66"s;
+    return e.what() == "Expecting Data element, but TLV has type 66"sv;
   });
 }
 
@@ -330,46 +330,46 @@
     "0630 1400 0703080145 1500 16031B0100 "
     "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "Name element is missing or out of order"s; });
+    [] (const auto& e) { return e.what() == "Name element is missing or out of order"sv; });
   BOOST_CHECK_EXCEPTION(d.wireDecode(
     "0630 0703080145 1500 1400 16031B0100 "
     "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "MetaInfo element is out of order"s; });
+    [] (const auto& e) { return e.what() == "MetaInfo element is out of order"sv; });
   BOOST_CHECK_EXCEPTION(d.wireDecode(
     "0630 0703080145 1400 16031B0100 1500 "
     "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "Content element is out of order"s; });
+    [] (const auto& e) { return e.what() == "Content element is out of order"sv; });
   BOOST_CHECK_EXCEPTION(d.wireDecode(
     "0630 0703080145 1400 1500 "
     "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76 16031B0100"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "SignatureInfo element is out of order"s; });
+    [] (const auto& e) { return e.what() == "SignatureInfo element is out of order"sv; });
   BOOST_CHECK_EXCEPTION(d.wireDecode(
     "0652 0703080145 1400 1500 16031B0100 "
     "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"
     "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "SignatureValue element is out of order"s; });
+    [] (const auto& e) { return e.what() == "SignatureValue element is out of order"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(MissingName)
 {
   BOOST_CHECK_EXCEPTION(d.wireDecode("0607 16031B0100 1700"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "Name element is missing or out of order"s; });
+                        [] (const auto& e) { return e.what() == "Name element is missing or out of order"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(MissingSignatureInfo)
 {
   BOOST_CHECK_EXCEPTION(d.wireDecode("0607 0703080144 1700"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "SignatureInfo element is missing"s; });
+                        [] (const auto& e) { return e.what() == "SignatureInfo element is missing"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(MissingSignatureValue)
 {
   BOOST_CHECK_EXCEPTION(d.wireDecode("0607 0700 16031B0100"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "SignatureValue element is missing"s; });
+                        [] (const auto& e) { return e.what() == "SignatureValue element is missing"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(UnrecognizedNonCriticalElementBeforeName)
@@ -378,7 +378,7 @@
                           "062E FC00 0703080144 16031B0100 "
                           "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"_block),
                         tlv::Error,
-                        [] (const auto& e) { return e.what() == "Name element is missing or out of order"s; });
+                        [] (const auto& e) { return e.what() == "Name element is missing or out of order"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(UnrecognizedCriticalElement)
@@ -387,7 +387,7 @@
                           "0632 0703080145 FB00 1400 1500 16031B0100 "
                           "1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76"_block),
                         tlv::Error,
-                        [] (const auto& e) { return e.what() == "Unrecognized element of critical type 251"s; });
+                        [] (const auto& e) { return e.what() == "Unrecognized element of critical type 251"sv; });
 }
 
 BOOST_AUTO_TEST_SUITE_END() // Decode
@@ -523,7 +523,9 @@
   BOOST_TEST(d.getContent().value_bytes() == nested, boost::test_tools::per_element());
 
   // Block overload, default constructed (invalid)
-  BOOST_CHECK_THROW(d.setContent(Block{}), std::invalid_argument);
+  BOOST_CHECK_EXCEPTION(d.setContent(Block{}), std::invalid_argument, [] (const auto& e) {
+    return e.what() == "Content block must be valid"sv;
+  });
 
   // span overload
   d.setContent(nested);
@@ -532,8 +534,15 @@
   BOOST_TEST(d.getContent().value_bytes() == nested, boost::test_tools::per_element());
   d.setContent(span<uint8_t>{});
   BOOST_CHECK_EQUAL(d.hasContent(), true);
-  BOOST_CHECK_EQUAL(d.getContent().type(), tlv::Content);
-  BOOST_CHECK_EQUAL(d.getContent().value_size(), 0);
+  BOOST_CHECK_EQUAL(d.getContent(), "1500"_block);
+
+  // string_view overload
+  d.setContent("hi"sv);
+  BOOST_CHECK_EQUAL(d.hasContent(), true);
+  BOOST_CHECK_EQUAL(d.getContent(), "15026869"_block);
+  d.setContent("");
+  BOOST_CHECK_EQUAL(d.hasContent(), true);
+  BOOST_CHECK_EQUAL(d.getContent(), "1500"_block);
 
   // ConstBufferPtr overload
   d.setContent(std::make_shared<Buffer>(direct, sizeof(direct)));
@@ -542,9 +551,12 @@
   BOOST_TEST(d.getContent().value_bytes() == direct, boost::test_tools::per_element());
   d.setContent(std::make_shared<Buffer>());
   BOOST_CHECK_EQUAL(d.hasContent(), true);
-  BOOST_CHECK_EQUAL(d.getContent().type(), tlv::Content);
-  BOOST_CHECK_EQUAL(d.getContent().value_size(), 0);
-  BOOST_CHECK_THROW(d.setContent(nullptr), std::invalid_argument);
+  BOOST_CHECK_EQUAL(d.getContent(), "1500"_block);
+
+  // ConstBufferPtr overload, null/empty pointer (invalid)
+  BOOST_CHECK_EXCEPTION(d.setContent(ConstBufferPtr{}), std::invalid_argument, [] (const auto& e) {
+    return e.what() == "Content buffer cannot be null"sv;
+  });
 
   // unset
   d.unsetContent();
@@ -573,7 +585,10 @@
   BOOST_CHECK_EQUAL(d.getSignatureValue().type(), tlv::SignatureValue);
   BOOST_CHECK_EQUAL(d.getSignatureValue().value_size(), 0);
 
-  BOOST_CHECK_THROW(d.setSignatureValue(nullptr), std::invalid_argument);
+  // ConstBufferPtr overload, null/empty pointer (invalid)
+  BOOST_CHECK_EXCEPTION(d.setSignatureValue(ConstBufferPtr{}), std::invalid_argument, [] (const auto& e) {
+    return e.what() == "SignatureValue buffer cannot be null"sv;
+  });
 }
 
 BOOST_FIXTURE_TEST_CASE(ExtractSignedRanges, KeyChainFixture)
diff --git a/tests/unit/interest.t.cpp b/tests/unit/interest.t.cpp
index 036dc72..bbf3af6 100644
--- a/tests/unit/interest.t.cpp
+++ b/tests/unit/interest.t.cpp
@@ -346,7 +346,7 @@
   i.setName(Name("/A").appendParametersSha256DigestPlaceholder());
   BOOST_CHECK_EQUAL(i.isParametersDigestValid(), false);
   BOOST_CHECK_EXCEPTION(i.wireEncode(), tlv::Error, [] (const auto& e) {
-    return e.what() == "Interest without parameters must not have a ParametersSha256DigestComponent"s;
+    return e.what() == "Interest without parameters must not have a ParametersSha256DigestComponent"sv;
   });
 }
 
@@ -364,7 +364,7 @@
   i.setNonce(42);
   // now the check fails while attempting to reencode
   BOOST_CHECK_EXCEPTION(i.wireEncode(), tlv::Error, [] (const auto& e) {
-    return e.what() == "Interest with parameters must have a ParametersSha256DigestComponent"s;
+    return e.what() == "Interest with parameters must have a ParametersSha256DigestComponent"sv;
   });
 }
 
@@ -393,7 +393,7 @@
 BOOST_AUTO_TEST_CASE(NotAnInterest)
 {
   BOOST_CHECK_EXCEPTION(i.wireDecode("4202CAFE"_block), tlv::Error, [] (const auto& e) {
-    return e.what() == "Expecting Interest element, but TLV has type 66"s;
+    return e.what() == "Expecting Interest element, but TLV has type 66"sv;
   });
 }
 
@@ -506,32 +506,32 @@
     "0529 2100 0703080149 1200 1E0B(1F09 1E023E15 0703080148) "
     "0A044ACB1E4C 0C0276A1 2201D6 2404C0C1C2C3"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "Name element is missing or out of order"s; });
+    [] (const auto& e) { return e.what() == "Name element is missing or out of order"sv; });
   BOOST_CHECK_EXCEPTION(i.wireDecode(
     "0529 0703080149 1200 2100 1E0B(1F09 1E023E15 0703080148) "
     "0A044ACB1E4C 0C0276A1 2201D6 2404C0C1C2C3"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "CanBePrefix element is out of order"s; });
+    [] (const auto& e) { return e.what() == "CanBePrefix element is out of order"sv; });
   BOOST_CHECK_EXCEPTION(i.wireDecode(
     "0529 0703080149 2100 1E0B(1F09 1E023E15 0703080148) 1200 "
     "0A044ACB1E4C 0C0276A1 2201D6 2404C0C1C2C3"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "MustBeFresh element is out of order"s; });
+    [] (const auto& e) { return e.what() == "MustBeFresh element is out of order"sv; });
   BOOST_CHECK_EXCEPTION(i.wireDecode(
     "0529 0703080149 2100 1200 0A044ACB1E4C "
     "1E0B(1F09 1E023E15 0703080148) 0C0276A1 2201D6 2404C0C1C2C3"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "ForwardingHint element is out of order"s; });
+    [] (const auto& e) { return e.what() == "ForwardingHint element is out of order"sv; });
   BOOST_CHECK_EXCEPTION(i.wireDecode(
     "0529 0703080149 2100 1200 1E0B(1F09 1E023E15 0703080148) "
     "0C0276A1 0A044ACB1E4C 2201D6 2404C0C1C2C3"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "Nonce element is out of order"s; });
+    [] (const auto& e) { return e.what() == "Nonce element is out of order"sv; });
   BOOST_CHECK_EXCEPTION(i.wireDecode(
     "0529 0703080149 2100 1200 1E0B(1F09 1E023E15 0703080148) "
     "0A044ACB1E4C 2201D6 0C0276A1 2404C0C1C2C3"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "InterestLifetime element is out of order"s; });
+    [] (const auto& e) { return e.what() == "InterestLifetime element is out of order"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(NonCriticalElementOutOfOrder)
@@ -558,51 +558,51 @@
 BOOST_AUTO_TEST_CASE(MissingName)
 {
   BOOST_CHECK_EXCEPTION(i.wireDecode("0500"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "Name element is missing or out of order"s; });
+                        [] (const auto& e) { return e.what() == "Name element is missing or out of order"sv; });
   BOOST_CHECK_EXCEPTION(i.wireDecode("0502 1200"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "Name element is missing or out of order"s; });
+                        [] (const auto& e) { return e.what() == "Name element is missing or out of order"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(BadName)
 {
   BOOST_CHECK_EXCEPTION(i.wireDecode("0502 0700"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "Name has zero name components"s; });
+                        [] (const auto& e) { return e.what() == "Name has zero name components"sv; });
   BOOST_CHECK_EXCEPTION(i.wireDecode("054C 074A(080149"
     "02200000000000000000000000000000000000000000000000000000000000000000"
     "080132"
     "02200000000000000000000000000000000000000000000000000000000000000000)"_block),
     tlv::Error,
-    [] (const auto& e) { return e.what() == "Name has more than one ParametersSha256DigestComponent"s; });
+    [] (const auto& e) { return e.what() == "Name has more than one ParametersSha256DigestComponent"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(BadCanBePrefix)
 {
   BOOST_CHECK_EXCEPTION(i.wireDecode("0508 0703080149 210102"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "CanBePrefix element has non-zero TLV-LENGTH"s; });
+                        [] (const auto& e) { return e.what() == "CanBePrefix element has non-zero TLV-LENGTH"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(BadMustBeFresh)
 {
   BOOST_CHECK_EXCEPTION(i.wireDecode("0508 0703080149 120102"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "MustBeFresh element has non-zero TLV-LENGTH"s; });
+                        [] (const auto& e) { return e.what() == "MustBeFresh element has non-zero TLV-LENGTH"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(BadNonce)
 {
   BOOST_CHECK_EXCEPTION(i.wireDecode("0507 0703080149 0A00"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "Nonce element is malformed"s; });
+                        [] (const auto& e) { return e.what() == "Nonce element is malformed"sv; });
   BOOST_CHECK_EXCEPTION(i.wireDecode("050A 0703080149 0A0304C263"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "Nonce element is malformed"s; });
+                        [] (const auto& e) { return e.what() == "Nonce element is malformed"sv; });
   BOOST_CHECK_EXCEPTION(i.wireDecode("050C 0703080149 0A05EFA420B262"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "Nonce element is malformed"s; });
+                        [] (const auto& e) { return e.what() == "Nonce element is malformed"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(BadHopLimit)
 {
   BOOST_CHECK_EXCEPTION(i.wireDecode("0507 0703080149 2200"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "HopLimit element is malformed"s; });
+                        [] (const auto& e) { return e.what() == "HopLimit element is malformed"sv; });
   BOOST_CHECK_EXCEPTION(i.wireDecode("0509 0703080149 22021356"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "HopLimit element is malformed"s; });
+                        [] (const auto& e) { return e.what() == "HopLimit element is malformed"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(BadParametersDigest)
@@ -631,16 +631,16 @@
 BOOST_AUTO_TEST_CASE(UnrecognizedNonCriticalElementBeforeName)
 {
   BOOST_CHECK_EXCEPTION(i.wireDecode("0507 FC00 0703080149"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "Name element is missing or out of order"s; });
+                        [] (const auto& e) { return e.what() == "Name element is missing or out of order"sv; });
 }
 
 BOOST_AUTO_TEST_CASE(UnrecognizedCriticalElement)
 {
   BOOST_CHECK_EXCEPTION(i.wireDecode("0507 0703080149 FB00"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "Unrecognized element of critical type 251"s; });
+                        [] (const auto& e) { return e.what() == "Unrecognized element of critical type 251"sv; });
   // v0.2 packet with Selectors
   BOOST_CHECK_EXCEPTION(i.wireDecode("0510 0703080149 09030D0101 0A0401000000"_block), tlv::Error,
-                        [] (const auto& e) { return e.what() == "Unrecognized element of critical type 9"s; });
+                        [] (const auto& e) { return e.what() == "Unrecognized element of critical type 9"sv; });
 }
 
 BOOST_AUTO_TEST_SUITE_END() // Decode
@@ -881,7 +881,11 @@
   BOOST_CHECK_EQUAL(i.getApplicationParameters(), "2401C0"_block);
   i.setApplicationParameters("8001C1"_block);
   BOOST_CHECK_EQUAL(i.getApplicationParameters(), "24038001C1"_block);
-  BOOST_CHECK_THROW(i.setApplicationParameters(Block{}), std::invalid_argument);
+
+  // Block overload, default constructed (invalid)
+  BOOST_CHECK_EXCEPTION(i.setApplicationParameters(Block{}), std::invalid_argument, [] (const auto& e) {
+    return e.what() == "ApplicationParameters block must be valid"sv;
+  });
 
   // span overload
   i.setApplicationParameters(PARAMETERS1);
@@ -889,12 +893,22 @@
   i.setApplicationParameters(span<uint8_t>{});
   BOOST_CHECK_EQUAL(i.getApplicationParameters(), "2400"_block);
 
+  // string_view overload
+  i.setApplicationParameters("hi"sv);
+  BOOST_CHECK_EQUAL(i.getApplicationParameters(), "24026869"_block);
+  i.setApplicationParameters("");
+  BOOST_CHECK_EQUAL(i.getApplicationParameters(), "2400"_block);
+
   // ConstBufferPtr overload
   i.setApplicationParameters(make_shared<Buffer>(PARAMETERS2, sizeof(PARAMETERS2)));
   BOOST_CHECK_EQUAL(i.getApplicationParameters(), "2401C2"_block);
   i.setApplicationParameters(make_shared<Buffer>());
   BOOST_CHECK_EQUAL(i.getApplicationParameters(), "2400"_block);
-  BOOST_CHECK_THROW(i.setApplicationParameters(nullptr), std::invalid_argument);
+
+  // ConstBufferPtr overload, null/empty pointer (invalid)
+  BOOST_CHECK_EXCEPTION(i.setApplicationParameters(ConstBufferPtr{}), std::invalid_argument, [] (const auto& e) {
+    return e.what() == "ApplicationParameters buffer cannot be null"sv;
+  });
 }
 
 BOOST_AUTO_TEST_CASE(SetSignature)
@@ -903,7 +917,7 @@
 
   Block sv1("2E04 01020304"_block);
   BOOST_CHECK_EXCEPTION(i.setSignatureValue(sv1.value_bytes()), tlv::Error, [] (const auto& e) {
-    return e.what() == "InterestSignatureInfo must be present to set InterestSignatureValue"s;
+    return e.what() == "InterestSignatureInfo must be present to set InterestSignatureValue"sv;
   });
 
   BOOST_CHECK(i.getSignatureInfo() == std::nullopt);
@@ -922,8 +936,10 @@
   BOOST_CHECK_EQUAL(i.getSignatureValue(), sv1);
   BOOST_CHECK_EQUAL(i.isSigned(), true);
 
-  // Throws because attempting to set InterestSignatureValue to nullptr
-  BOOST_CHECK_THROW(i.setSignatureValue(nullptr), std::invalid_argument);
+  // Throws because attempting to set InterestSignatureValue to a null pointer
+  BOOST_CHECK_EXCEPTION(i.setSignatureValue(ConstBufferPtr{}), std::invalid_argument, [] (const auto& e) {
+    return e.what() == "InterestSignatureValue buffer cannot be null"sv;
+  });
   BOOST_CHECK_EQUAL(i.getSignatureValue(), sv1);
   BOOST_CHECK_EQUAL(i.isSigned(), true);
 
@@ -1046,9 +1062,11 @@
 
 BOOST_AUTO_TEST_CASE(ExtractSignedRanges)
 {
+  InputBuffers bufs;
+
   Interest i1;
-  BOOST_CHECK_EXCEPTION(i1.extractSignedRanges(), tlv::Error, [] (const auto& e) {
-    return e.what() == "Name has zero name components"s;
+  BOOST_CHECK_EXCEPTION(bufs = i1.extractSignedRanges(), tlv::Error, [] (const auto& e) {
+    return e.what() == "Name has zero name components"sv;
   });
   i1.setName("/test/prefix");
   i1.setNonce(0x01020304);
@@ -1124,16 +1142,16 @@
   // Ensure parameters range captured properly
   BOOST_CHECK_EQUAL_COLLECTIONS(ranges3.back().begin(), ranges3.back().end(), &WIRE[58], &WIRE[79]);
 
-  // Test failure with missing ParametersSha256DigestComponent
   Interest i3("/a");
-  BOOST_CHECK_EXCEPTION(i3.extractSignedRanges(), tlv::Error, [] (const auto& e) {
-    return e.what() == "Interest Name must end with a ParametersSha256DigestComponent"s;
+  // Failure due to missing ParametersSha256DigestComponent
+  BOOST_CHECK_EXCEPTION(bufs = i3.extractSignedRanges(), tlv::Error, [] (const auto& e) {
+    return e.what() == "Interest Name must end with a ParametersSha256DigestComponent"sv;
   });
 
-  // Test failure with missing InterestSignatureInfo
-  i3.setApplicationParameters(span<uint8_t>{});
-  BOOST_CHECK_EXCEPTION(i3.extractSignedRanges(), tlv::Error, [] (const auto& e) {
-    return e.what() == "Interest missing InterestSignatureInfo"s;
+  i3.setApplicationParameters("");
+  // Failure due to missing InterestSignatureInfo
+  BOOST_CHECK_EXCEPTION(bufs = i3.extractSignedRanges(), tlv::Error, [] (const auto& e) {
+    return e.what() == "Interest missing InterestSignatureInfo"sv;
   });
 }
 
diff --git a/tests/unit/link.t.cpp b/tests/unit/link.t.cpp
index f1bbd07..2a17a96 100644
--- a/tests/unit/link.t.cpp
+++ b/tests/unit/link.t.cpp
@@ -35,7 +35,7 @@
 BOOST_AUTO_TEST_SUITE(TestLink)
 
 const uint8_t GOOD_LINK[] = {
-0x06, 0xd0, // Data
+  0x06, 0xd0, // Data
     0x07, 0x14, // Name
         0x08, 0x05,
             0x6c, 0x6f, 0x63, 0x61, 0x6c,
@@ -84,7 +84,7 @@
 BOOST_AUTO_TEST_CASE(Decode)
 {
   Link link(Block{GOOD_LINK});
-  BOOST_CHECK_EQUAL(link.getName(), Name("/local/ndn/prefix"));
+  BOOST_TEST(link.getName() == "/local/ndn/prefix");
   BOOST_TEST(link.getDelegationList() == std::vector<Name>({"/local", "/ndn"}),
              boost::test_tools::per_element());
 }
@@ -104,14 +104,25 @@
 {
   Link link1("/test", {"/test1", "/test2", "/test3"});
   signData(link1);
-  Block wire = link1.wireEncode();
+  BOOST_TEST(link1.getName() == "/test");
+  BOOST_TEST(link1.getContentType() == tlv::ContentType_Link);
 
-  Link link2(wire);
-  BOOST_CHECK_EQUAL(link2.getName(), "/test");
+  Link link2(link1.wireEncode());
+  BOOST_TEST(link2.getName() == "/test");
   BOOST_TEST(link2.getDelegationList() == std::vector<Name>({"/test1", "/test2", "/test3"}),
              boost::test_tools::per_element());
 }
 
+BOOST_AUTO_TEST_CASE(EncodeEmpty)
+{
+  Link link("/L");
+  signData(link);
+  BOOST_TEST(link.getName() == "/L");
+  BOOST_TEST(link.getContentType() == tlv::ContentType_Link);
+  BOOST_TEST(link.getContent() == "1500"_block);
+  BOOST_TEST(link.getDelegationList().empty() == true);
+}
+
 BOOST_AUTO_TEST_SUITE_END() // EncodeDecode
 
 BOOST_AUTO_TEST_SUITE(Modify)
diff --git a/tests/unit/security/certificate.t.cpp b/tests/unit/security/certificate.t.cpp
index facb261..a44ddfb 100644
--- a/tests/unit/security/certificate.t.cpp
+++ b/tests/unit/security/certificate.t.cpp
@@ -315,8 +315,8 @@
 R"TXT(Certificate Name:
   /ndn/test/identity/KEY/%C7G%3A%D6%12P%B5%F0/self/v=1650251820652
 Public Key:
-  Key Type: Unknown (23 bytes)
-  bm90IGEgdmFsaWQgcHVibGljIGtleQA=
+  Key Type: Unknown (22 bytes)
+  bm90IGEgdmFsaWQgcHVibGljIGtleQ==
 Validity:
   Not Before: 1970-01-01T00:00:00
   Not After: 2042-04-13T03:17:00
@@ -326,9 +326,8 @@
   Self-Signed: yes
 )TXT");
 
-  const uint8_t notAKey[] = "not a valid public key";
   Certificate cert4(cert3);
-  cert4.setContent(notAKey);
+  cert4.setContent("not a valid public key"sv);
   BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(cert4), expected4);
 
   const std::string expected5(
diff --git a/tests/unit/security/key-chain.t.cpp b/tests/unit/security/key-chain.t.cpp
index d0b717f..c154851 100644
--- a/tests/unit/security/key-chain.t.cpp
+++ b/tests/unit/security/key-chain.t.cpp
@@ -711,7 +711,7 @@
   BOOST_CHECK_THROW(signerKeyChain.makeCertificate(request, signerParams), std::invalid_argument);
 
   // empty content
-  request.setContent(span<uint8_t>{});
+  request.setContent("");
   BOOST_CHECK_THROW(signerKeyChain.makeCertificate(request, signerParams), std::invalid_argument);
 }
 
