Avoid deprecated ndn-cxx functions

Change-Id: I763368c2ea12902b4ea400f92c23b17ad5a5628e
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index cd4d0d2..43c5baf 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis,
+ * Copyright (c) 2014-2022,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -48,10 +48,12 @@
   receiveHelloData(const ndn::Name& sender, const ndn::Name& receiver)
   {
     ndn::Name dataName(sender);
-    dataName.append("NLSR").append("INFO").append(receiver.wireEncode()).appendVersion();
+    dataName.append("NLSR")
+            .append("INFO")
+            .append(ndn::tlv::GenericNameComponent, receiver.wireEncode())
+            .appendVersion();
 
     ndn::Data data(dataName);
-
     nlsr.m_helloProtocol.onContentValidated(data);
   }