diff --git a/tests/publisher/test-lsa-publisher.cpp b/tests/publisher/test-lsa-publisher.cpp
index aa7922c..4ea6544 100644
--- a/tests/publisher/test-lsa-publisher.cpp
+++ b/tests/publisher/test-lsa-publisher.cpp
@@ -34,9 +34,11 @@
 
 BOOST_AUTO_TEST_CASE(AdjacencyLsaPublisherBasic)
 {
+  ndn::Name thisRouter("/RouterA");
+
   // Adjacency LSA for RouterA
   AdjLsa routerALsa;
-  routerALsa.setOrigRouter("/RouterA");
+  routerALsa.setOrigRouter(thisRouter);
   addAdjacency(routerALsa, "/RouterA/adjacency1", "udp://face-1", 10);
   lsdb.installAdjLsa(routerALsa);
 
@@ -49,9 +51,12 @@
   addAdjacency(routerBLsa, "/RouterB/adjacency3", "udp://face-3", 30);
   lsdb.installAdjLsa(routerBLsa);
 
-  AdjacencyLsaPublisher publisher(lsdb, *face, "/RouterA", keyChain);
+  AdjacencyLsaPublisher publisher(lsdb, *face, keyChain);
 
-  publisher.publish();
+  ndn::Name publishingPrefix = ndn::Name(thisRouter);
+  publishingPrefix.append(Lsdb::NAME_COMPONENT).append(AdjacencyLsaPublisher::DATASET_COMPONENT);
+
+  publisher.publish(publishingPrefix);
   face->processEvents(ndn::time::milliseconds(1));
 
   BOOST_REQUIRE_EQUAL(face->sentDatas.size(), 1);
@@ -69,7 +74,9 @@
 
 BOOST_AUTO_TEST_CASE(CoordinateLsaBasic)
 {
-  CoordinateLsa routerALsa = createCoordinateLsa("/RouterA", 10.0, 20.0);
+  ndn::Name thisRouter("/RouterA");
+
+  CoordinateLsa routerALsa = createCoordinateLsa(thisRouter.toUri(), 10.0, 20.0);
   lsdb.installCoordinateLsa(routerALsa);
 
   CoordinateLsa routerBLsa = createCoordinateLsa("/RouterB", 123.45, 543.21);
@@ -78,9 +85,12 @@
   CoordinateLsa routerCLsa = createCoordinateLsa("/RouterC", 0.01, 0.02);
   lsdb.installCoordinateLsa(routerCLsa);
 
-  CoordinateLsaPublisher publisher(lsdb, *face, "/RouterA", keyChain);
+  CoordinateLsaPublisher publisher(lsdb, *face, keyChain);
 
-  publisher.publish();
+  ndn::Name publishingPrefix = ndn::Name(thisRouter);
+  publishingPrefix.append(Lsdb::NAME_COMPONENT).append(CoordinateLsaPublisher::DATASET_COMPONENT);
+
+  publisher.publish(publishingPrefix);
   face->processEvents(ndn::time::milliseconds(1));
 
   BOOST_REQUIRE_EQUAL(face->sentDatas.size(), 1);
@@ -102,10 +112,12 @@
 
 BOOST_AUTO_TEST_CASE(NameLsaBasic)
 {
+  ndn::Name thisRouter("/RouterA");
+
   // Name LSA for RouterA
   NameLsa routerALsa;
-  routerALsa.setOrigRouter("/RouterA");
-  routerALsa.addName("/RouterA/name1");
+  routerALsa.setOrigRouter(thisRouter.toUri());
+  routerALsa.addName(ndn::Name(thisRouter).append("name1"));
   lsdb.installNameLsa(routerALsa);
 
   // Name LSA for RouterB
@@ -116,9 +128,12 @@
   routerBLsa.addName("/RouterB/name3");
   lsdb.installNameLsa(routerBLsa);
 
-  NameLsaPublisher publisher(lsdb, *face, "/RouterA", keyChain);
+  NameLsaPublisher publisher(lsdb, *face, keyChain);
 
-  publisher.publish();
+  ndn::Name publishingPrefix = ndn::Name(thisRouter);
+  publishingPrefix.append(Lsdb::NAME_COMPONENT).append(NameLsaPublisher::DATASET_COMPONENT);
+
+  publisher.publish(publishingPrefix);
   face->processEvents(ndn::time::milliseconds(1));
 
   BOOST_REQUIRE_EQUAL(face->sentDatas.size(), 1);
diff --git a/tests/publisher/test-lsdb-dataset-interest-handler.cpp b/tests/publisher/test-lsdb-dataset-interest-handler.cpp
index 22b2819..15c6eea 100644
--- a/tests/publisher/test-lsdb-dataset-interest-handler.cpp
+++ b/tests/publisher/test-lsdb-dataset-interest-handler.cpp
@@ -82,30 +82,53 @@
 
   ndn::Name thisRouter("/This/Router");
   LsdbDatasetInterestHandler publisher(lsdb, *face, thisRouter, keyChain);
+  publisher.startListeningOnLocalhost();
 
   face->processEvents(ndn::time::milliseconds(10));
 
-  ndn::Name commandPrefix(thisRouter);
-  commandPrefix.append("lsdb");
+  // Localhost prefix
+  ndn::Name localhostCommandPrefix = publisher.getLocalhostCommandPrefix();
 
   // Request adjacency LSAs
-  face->receive(ndn::Interest(ndn::Name(commandPrefix).append("adjacencies")));
-
+  face->receive(ndn::Interest(ndn::Name(localhostCommandPrefix).append("adjacencies")));
   processDatasetInterest(face,
     [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::AdjacencyLsa; });
 
   // Request coordinate LSAs
-  face->receive(ndn::Interest(ndn::Name(commandPrefix).append("coordinates")));
+  face->receive(ndn::Interest(ndn::Name(localhostCommandPrefix).append("coordinates")));
   processDatasetInterest(face,
     [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::CoordinateLsa; });
 
   // Request Name LSAs
-  face->receive(ndn::Interest(ndn::Name(commandPrefix).append("names")));
+  face->receive(ndn::Interest(ndn::Name(localhostCommandPrefix).append("names")));
   processDatasetInterest(face,
     [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::NameLsa; });
 
   // Request LSDB Status
-  face->receive(ndn::Interest(ndn::Name(commandPrefix).append("list")));
+  face->receive(ndn::Interest(ndn::Name(localhostCommandPrefix).append("list")));
+  processDatasetInterest(face,
+    [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::LsdbStatus; });
+
+  // Router name prefix
+  ndn::Name routerCommandPrefix = publisher.getLocalhostCommandPrefix();
+
+  // Request adjacency LSAs
+  face->receive(ndn::Interest(ndn::Name(routerCommandPrefix).append("adjacencies")));
+  processDatasetInterest(face,
+    [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::AdjacencyLsa; });
+
+  // Request coordinate LSAs
+  face->receive(ndn::Interest(ndn::Name(routerCommandPrefix).append("coordinates")));
+  processDatasetInterest(face,
+    [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::CoordinateLsa; });
+
+  // Request Name LSAs
+  face->receive(ndn::Interest(ndn::Name(routerCommandPrefix).append("names")));
+  processDatasetInterest(face,
+    [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::NameLsa; });
+
+  // Request LSDB Status
+  face->receive(ndn::Interest(ndn::Name(routerCommandPrefix).append("list")));
   processDatasetInterest(face,
     [] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::LsdbStatus; });
 }
@@ -115,22 +138,42 @@
   ndn::Name thisRouter("/This/Router");
   LsdbDatasetInterestHandler publisher(lsdb, *face, thisRouter, keyChain);
 
+  // Localhost prefix
+  publisher.startListeningOnLocalhost();
   face->processEvents(ndn::time::milliseconds(10));
 
-  ndn::Name commandPrefix(thisRouter);
-  commandPrefix.append("lsdb");
+  ndn::Name localhostCommandPrefix = publisher.getLocalhostCommandPrefix();
 
   // Unsupported command
-  face->receive(ndn::Interest(ndn::Name(commandPrefix).append("unsupported")));
+  face->receive(ndn::Interest(ndn::Name(localhostCommandPrefix).append("unsupported")));
   face->processEvents(ndn::time::milliseconds(1));
 
-  checkErrorResponse(face, 501);
+  checkErrorResponse(face, LsdbDatasetInterestHandler::ERROR_CODE_UNSUPPORTED_COMMAND);
 
   // Long malformed command
-  face->receive(ndn::Interest(ndn::Name(commandPrefix).append("extra").append("malformed")));
+  face->receive(
+    ndn::Interest(ndn::Name(localhostCommandPrefix).append("extra").append("malformed")));
   face->processEvents(ndn::time::milliseconds(1));
 
-  checkErrorResponse(face, 400);
+  checkErrorResponse(face, LsdbDatasetInterestHandler::ERROR_CODE_MALFORMED_COMMAND);
+
+  // Router name prefix
+  publisher.startListeningOnRouterPrefix();
+  face->processEvents(ndn::time::milliseconds(10));
+
+  ndn::Name remoteCommandPrefix = publisher.getRouterNameCommandPrefix();
+
+  // Unsupported command
+  face->receive(ndn::Interest(ndn::Name(remoteCommandPrefix).append("unsupported")));
+  face->processEvents(ndn::time::milliseconds(1));
+
+  checkErrorResponse(face, LsdbDatasetInterestHandler::ERROR_CODE_UNSUPPORTED_COMMAND);
+
+  // Long malformed command
+  face->receive(ndn::Interest(ndn::Name(remoteCommandPrefix).append("extra").append("malformed")));
+  face->processEvents(ndn::time::milliseconds(1));
+
+  checkErrorResponse(face, LsdbDatasetInterestHandler::ERROR_CODE_MALFORMED_COMMAND);
 
   // Short malformed command
   face->receive(ndn::Interest(ndn::Name(thisRouter).append("malformed")));
diff --git a/tests/publisher/test-lsdb-status-publisher.cpp b/tests/publisher/test-lsdb-status-publisher.cpp
index 50d48da..58c4eff 100644
--- a/tests/publisher/test-lsdb-status-publisher.cpp
+++ b/tests/publisher/test-lsdb-status-publisher.cpp
@@ -75,16 +75,19 @@
   lsdb.installNameLsa(routerBNameLsa);
 
   ndn::Name thisRouter("/This/Router");
-  AdjacencyLsaPublisher adjacencyLsaPublisher(lsdb, *face, thisRouter, keyChain);
-  CoordinateLsaPublisher coordinateLsaPublisher(lsdb, *face, thisRouter, keyChain);
-  NameLsaPublisher nameLsaPublisher(lsdb, *face, thisRouter, keyChain);
+  AdjacencyLsaPublisher adjacencyLsaPublisher(lsdb, *face, keyChain);
+  CoordinateLsaPublisher coordinateLsaPublisher(lsdb, *face, keyChain);
+  NameLsaPublisher nameLsaPublisher(lsdb, *face, keyChain);
 
-  LsdbStatusPublisher publisher(lsdb, *face, thisRouter, keyChain,
+  LsdbStatusPublisher publisher(lsdb, *face, keyChain,
                                 adjacencyLsaPublisher,
                                 coordinateLsaPublisher,
                                 nameLsaPublisher);
 
-  publisher.publish();
+  ndn::Name publishingPrefix = ndn::Name(thisRouter);
+  publishingPrefix.append(Lsdb::NAME_COMPONENT).append(LsdbStatusPublisher::DATASET_COMPONENT);
+
+  publisher.publish(publishingPrefix);
   face->processEvents(ndn::time::milliseconds(1));
 
   BOOST_REQUIRE_EQUAL(face->sentDatas.size(), 1);
diff --git a/tests/publisher/test-segment-publisher.cpp b/tests/publisher/test-segment-publisher.cpp
index 8cc8dde..0855466 100644
--- a/tests/publisher/test-segment-publisher.cpp
+++ b/tests/publisher/test-segment-publisher.cpp
@@ -41,10 +41,9 @@
 {
 public:
   TestSegmentPublisher(ndn::util::DummyClientFace& face,
-                       const ndn::Name& prefix,
                        ndn::KeyChain& keyChain,
                        const ndn::time::milliseconds freshnessPeriod)
-    : SegmentPublisher(face, prefix, keyChain, freshnessPeriod)
+    : SegmentPublisher(face, keyChain, freshnessPeriod)
     , m_totalPayloadLength(0)
   {
 
@@ -92,8 +91,8 @@
   SegmentPublisherFixture()
     : m_face(ndn::util::makeDummyClientFace())
     , m_expectedFreshnessPeriod(ndn::time::milliseconds(111))
-    , m_publisher(*m_face, "/localhost/nfd/SegmentPublisherFixture",
-                  m_keyChain, m_expectedFreshnessPeriod)
+    , m_publisher(*m_face, m_keyChain, m_expectedFreshnessPeriod)
+    , m_publishingPrefix("/localhost/nfd/SegmentPublisherFixture")
   {
   }
 
@@ -140,6 +139,7 @@
   TestSegmentPublisher<N> m_publisher;
   ndn::EncodingBuffer m_buffer;
   ndn::KeyChain m_keyChain;
+  const ndn::Name m_publishingPrefix;
 };
 
 using boost::mpl::int_;
@@ -149,7 +149,7 @@
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(Generate, T, DatasetSizes, SegmentPublisherFixture<T::value>)
 {
-  this->m_publisher.publish();
+  this->m_publisher.publish(this->m_publishingPrefix);
   this->m_face->processEvents();
 
   size_t nSegments = this->m_publisher.getTotalPayloadLength() /
