diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index 56807c7..ccbea1b 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -258,8 +258,18 @@
                                 _1, faceId));
 }
 
+AdjacencyList::iterator
+AdjacencyList::findAdjacent(const ndn::util::FaceUri& faceUri)
+{
+  return std::find_if(m_adjList.begin(),
+                      m_adjList.end(),
+                      [&faceUri] (const Adjacent& adj) {
+                        return faceUri == adj.getFaceUri();
+                      });
+}
+
 uint64_t
-AdjacencyList::getFaceId(const std::string& faceUri)
+AdjacencyList::getFaceId(const ndn::util::FaceUri& faceUri)
 {
   std::list<Adjacent>::iterator it = std::find_if(m_adjList.begin(),
                                                   m_adjList.end(),
diff --git a/src/adjacency-list.hpp b/src/adjacency-list.hpp
index c9553de..daceae1 100644
--- a/src/adjacency-list.hpp
+++ b/src/adjacency-list.hpp
@@ -145,8 +145,11 @@
   AdjacencyList::iterator
   findAdjacent(uint64_t faceId);
 
+  AdjacencyList::iterator
+  findAdjacent(const ndn::util::FaceUri& faceUri);
+
   uint64_t
-  getFaceId(const std::string& faceUri);
+  getFaceId(const ndn::util::FaceUri& faceUri);
 
   void
   writeLog();
diff --git a/src/adjacent.cpp b/src/adjacent.cpp
index fb22ed3..55ddff5 100644
--- a/src/adjacent.cpp
+++ b/src/adjacent.cpp
@@ -16,9 +16,6 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- *
- * \author A K M Mahmudul Hoque <ahoque1@memphis.edu>
- *
  **/
 #include <iostream>
 #include <string>
@@ -33,13 +30,11 @@
 
 INIT_LOGGER("Adjacent");
 
-using namespace std;
-
 const float Adjacent::DEFAULT_LINK_COST = 10.0;
 
 Adjacent::Adjacent()
     : m_name()
-    , m_connectingFaceUri()
+    , m_faceUri()
     , m_linkCost(DEFAULT_LINK_COST)
     , m_status(STATUS_INACTIVE)
     , m_interestTimedOutNo(0)
@@ -49,7 +44,7 @@
 
 Adjacent::Adjacent(const ndn::Name& an)
     : m_name(an)
-    , m_connectingFaceUri()
+    , m_faceUri()
     , m_linkCost(DEFAULT_LINK_COST)
     , m_status(STATUS_INACTIVE)
     , m_interestTimedOutNo(0)
@@ -57,32 +52,31 @@
   {
   }
 
-Adjacent::Adjacent(const ndn::Name& an, const std::string& cfu,  double lc,
+Adjacent::Adjacent(const ndn::Name& an, const ndn::util::FaceUri& faceUri,  double lc,
                    Status s, uint32_t iton, uint64_t faceId)
     : m_name(an)
-    , m_connectingFaceUri(cfu)
+    , m_faceUri(faceUri)
     , m_linkCost(lc)
     , m_status(s)
     , m_interestTimedOutNo(iton)
     , m_faceId(faceId)
   {
-
   }
 
 bool
 Adjacent::operator==(const Adjacent& adjacent) const
 {
   return (m_name == adjacent.getName()) &&
-         (m_connectingFaceUri == adjacent.getConnectingFaceUri()) &&
+         (m_faceUri == adjacent.getFaceUri()) &&
          (std::abs(m_linkCost - adjacent.getLinkCost()) <
-          std::numeric_limits<double>::epsilon()) ;
+          std::numeric_limits<double>::epsilon());
 }
 
 void
 Adjacent::writeLog()
 {
   _LOG_DEBUG("Adjacent : " << m_name);
-  _LOG_DEBUG("Connecting FaceUri: " << m_connectingFaceUri);
+  _LOG_DEBUG("Connecting FaceUri: " << m_faceUri);
   _LOG_DEBUG("Link Cost: " << m_linkCost);
   _LOG_DEBUG("Status: " << m_status);
   _LOG_DEBUG("Interest Timed out: " << m_interestTimedOutNo);
diff --git a/src/adjacent.hpp b/src/adjacent.hpp
index d1995cf..4aded01 100644
--- a/src/adjacent.hpp
+++ b/src/adjacent.hpp
@@ -16,14 +16,13 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- *
- * \author A K M Mahmudul Hoque <ahoque1@memphis.edu>
- *
  **/
 #include <string>
 #include <cmath>
 #include <boost/cstdint.hpp>
+
 #include <ndn-cxx/face.hpp>
+#include <ndn-cxx/util/face-uri.hpp>
 
 #ifndef NLSR_ADJACENT_HPP
 #define NLSR_ADJACENT_HPP
@@ -45,7 +44,7 @@
 
   Adjacent(const ndn::Name& an);
 
-  Adjacent(const ndn::Name& an, const std::string& cfu,  double lc,
+  Adjacent(const ndn::Name& an, const ndn::util::FaceUri& faceUri, double lc,
            Status s, uint32_t iton, uint64_t faceId);
 
   const ndn::Name&
@@ -60,16 +59,16 @@
     m_name = an;
   }
 
-  const std::string&
-  getConnectingFaceUri() const
+  const ndn::util::FaceUri&
+  getFaceUri() const
   {
-    return m_connectingFaceUri;
+    return m_faceUri;
   }
 
   void
-  setConnectingFaceUri(const std::string& cfu)
+  setFaceUri(const ndn::util::FaceUri& faceUri)
   {
-    m_connectingFaceUri = cfu;
+    m_faceUri = faceUri;
   }
 
   uint64_t
@@ -131,15 +130,15 @@
   }
 
   inline bool
-  compareFaceId(uint64_t faceId)
+  compareFaceId(const uint64_t faceId)
   {
     return m_faceId == faceId;
   }
 
   inline bool
-  compareFaceUri(std::string& faceUri)
+  compareFaceUri(const ndn::util::FaceUri& faceUri)
   {
-    return m_connectingFaceUri == faceUri;
+    return m_faceUri == faceUri;
   }
 
   void
@@ -150,7 +149,7 @@
 
 private:
   ndn::Name m_name;
-  std::string m_connectingFaceUri;
+  ndn::util::FaceUri m_faceUri;
   double m_linkCost;
   Status m_status;
   uint32_t m_interestTimedOutNo;
@@ -159,4 +158,4 @@
 
 } // namespace nlsr
 
-#endif //NLSR_ADJACENT_HPP
+#endif // NLSR_ADJACENT_HPP
diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index 70600fb..211609a 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -474,12 +474,13 @@
       try {
         ConfigSection CommandAttriTree = tn->second;
         std::string name = CommandAttriTree.get<std::string>("name");
-        std::string faceUri = CommandAttriTree.get<std::string>("face-uri");
+        std::string uriString = CommandAttriTree.get<std::string>("face-uri");
 
-        ndn::util::FaceUri uri;
-
-        if (!uri.parse(faceUri)) {
-          std::cerr << "Malformed face-uri <" << faceUri << "> for " << name << std::endl;
+        ndn::util::FaceUri faceUri;
+        try {
+          faceUri = ndn::util::FaceUri(uriString);
+        } catch (ndn::util::FaceUri::Error e) {
+          std::cerr << "Malformed face-uri <" << uriString << "> for " << name << std::endl;
           return false;
         }
 
diff --git a/src/hello-protocol.cpp b/src/hello-protocol.cpp
index 2f27020..52e8997 100644
--- a/src/hello-protocol.cpp
+++ b/src/hello-protocol.cpp
@@ -72,7 +72,7 @@
     // successful registration prompts a callback that sends the hello
     // Interest to the new Face.
     else {
-      registerPrefixes((*it).getName(), (*it).getConnectingFaceUri(),
+      registerPrefixes((*it).getName(), (*it).getFaceUri().toString(),
                        (*it).getLinkCost(), ndn::time::milliseconds::max());
     }
   }
@@ -129,7 +129,7 @@
       // If the originator of the Interest currently lacks a Face, we
       // need to give it one.
       else {
-        registerPrefixes(adjacent->getName(), adjacent->getConnectingFaceUri(),
+        registerPrefixes(adjacent->getName(), adjacent->getFaceUri().toString(),
                          adjacent->getLinkCost(), ndn::time::milliseconds::max());
       }
     }
@@ -262,7 +262,7 @@
     adjacent->setFaceId(commandSuccessResult.getFaceId());
     ndn::Name broadcastKeyPrefix = DEFAULT_BROADCAST_PREFIX;
     broadcastKeyPrefix.append("KEYS");
-    std::string faceUri = adjacent->getConnectingFaceUri();
+    std::string faceUri = adjacent->getFaceUri().toString();
     double linkCost = adjacent->getLinkCost();
     m_nlsr.getFib().registerPrefix(m_nlsr.getConfParameter().getChronosyncPrefix(),
                                  faceUri, linkCost, timeout,
diff --git a/src/lsa.cpp b/src/lsa.cpp
index 46dc1c4..78e5837 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -253,7 +253,7 @@
   os << m_origRouter << "|" << AdjLsa::TYPE_STRING << "|" << m_lsSeqNo << "|"
      << ndn::time::toIsoString(m_expirationTimePoint) << "|" << m_adl.getSize();
   for (const auto& adjacent : m_adl.getAdjList()) {
-    os << "|" << adjacent.getName() << "|" << adjacent.getConnectingFaceUri()
+    os << "|" << adjacent.getName() << "|" << adjacent.getFaceUri()
        << "|" << adjacent.getLinkCost();
   }
   os << "|";
@@ -290,7 +290,8 @@
       ndn::Name adjName(*tok_iter++);
       std::string connectingFaceUri(*tok_iter++);
       double linkCost = boost::lexical_cast<double>(*tok_iter++);
-      Adjacent adjacent(adjName, connectingFaceUri, linkCost, Adjacent::STATUS_INACTIVE, 0, 0);
+      Adjacent adjacent(adjName, ndn::util::FaceUri(connectingFaceUri), linkCost,
+                        Adjacent::STATUS_INACTIVE, 0, 0);
       addAdjacent(adjacent);
     }
     catch (const std::exception& e) {
@@ -342,7 +343,7 @@
   for (const Adjacent& adjacency : adjLsa) {
   os << "    Adjacent " << adjacencyIndex++ << ":\n"
      << "      Adjacent Name: " << adjacency.getName() << "\n"
-     << "      Connecting FaceUri: " << adjacency.getConnectingFaceUri() << "\n"
+     << "      Connecting FaceUri: " << adjacency.getFaceUri() << "\n"
      << "      Link Cost: " << adjacency.getLinkCost() << "\n";
   }
   os << "adj_lsa_end";
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index f00bbe1..02df4aa 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -198,15 +198,15 @@
                            std::function<void(std::list<Adjacent>::iterator)> then)
 {
   if (currentNeighbor != m_adjacencyList.getAdjList().end()) {
-    ndn::util::FaceUri uri(currentNeighbor->getConnectingFaceUri());
+    ndn::util::FaceUri uri(currentNeighbor->getFaceUri());
     uri.canonize([this, then, currentNeighbor] (ndn::util::FaceUri canonicalUri) {
-        _LOG_DEBUG("Canonized URI: " << currentNeighbor->getConnectingFaceUri()
+        _LOG_DEBUG("Canonized URI: " << currentNeighbor->getFaceUri()
                    << " to: " << canonicalUri);
-        currentNeighbor->setConnectingFaceUri(canonicalUri.toString());
+        currentNeighbor->setFaceUri(canonicalUri);
         then(std::next(currentNeighbor));
       },
       [this, then, currentNeighbor] (const std::string& reason) {
-        _LOG_ERROR("Could not canonize URI: " << currentNeighbor->getConnectingFaceUri()
+        _LOG_ERROR("Could not canonize URI: " << currentNeighbor->getFaceUri()
                    << " because: " << reason);
         then(std::next(currentNeighbor));
       },
@@ -388,7 +388,7 @@
   std::list<Adjacent>& adjacents = m_adjacencyList.getAdjList();
   for (std::list<Adjacent>::iterator it = adjacents.begin();
        it != adjacents.end(); it++) {
-    m_fib.destroyFace((*it).getConnectingFaceUri(),
+    m_fib.destroyFace((*it).getFaceUri().toString(),
                       std::bind(&Nlsr::onDestroyFaceSuccess, this, _1),
                       std::bind(&Nlsr::onDestroyFaceFailure, this, _1));
   }
diff --git a/src/publisher/lsa-publisher.cpp b/src/publisher/lsa-publisher.cpp
index 3d16581..7060c05 100644
--- a/src/publisher/lsa-publisher.cpp
+++ b/src/publisher/lsa-publisher.cpp
@@ -52,7 +52,7 @@
     for (const Adjacent& adj : lsa.getAdl().getAdjList()) {
       tlv::Adjacency tlvAdj;
       tlvAdj.setName(adj.getName());
-      tlvAdj.setUri(adj.getConnectingFaceUri());
+      tlvAdj.setUri(adj.getFaceUri().toString());
       tlvAdj.setCost(adj.getLinkCost());
       tlvLsa.addAdjacency(tlvAdj);
     }
diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index 777ab1b..c4ddad8 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -266,7 +266,7 @@
                     uint64_t faceCost, const ndn::time::milliseconds& timeout,
                     uint64_t flags, uint8_t times)
 {
-  uint64_t faceId = m_adjacencyList.getFaceId(faceUri);
+  uint64_t faceId = m_adjacencyList.getFaceId(ndn::util::FaceUri(faceUri));
   if (faceId != 0) {
     ndn::nfd::ControlParameters faceParameters;
     faceParameters
diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index e464c49..54d486d 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -252,7 +252,7 @@
   int v, u;
   int* Q = new int[m_nRouters]; // Each cell represents the router with that mapping no.
   int head = 0;
-  /* Initiate the Parent */
+  // Initiate the Parent
   for (i = 0 ; i < static_cast<int>(m_nRouters); i++) {
     m_parent[i] = EMPTY_PARENT;
     // Array where the ith element is the distance to the router with mapping no i.
@@ -318,7 +318,7 @@
         // Fetch its actual name
         ndn::Name nextHopRouterName = pMap.getRouterNameByMappingNo(nextHopRouter);
         std::string nextHopFace =
-          pnlsr.getAdjacencyList().getAdjacent(nextHopRouterName).getConnectingFaceUri();
+          pnlsr.getAdjacencyList().getAdjacent(nextHopRouterName).getFaceUri().toString();
         // Add next hop to routing table
         NextHop nh(nextHopFace, routeCost);
         rt.addNextHop(pMap.getRouterNameByMappingNo(i), nh);
@@ -426,7 +426,7 @@
       continue;
     }
 
-    std::string srcFaceUri = adj->getConnectingFaceUri();
+    std::string srcFaceUri = adj->getFaceUri().toString();
 
     // Install nexthops for this router to the neighbor; direct neighbors have a 0 cost link
     addNextHop(srcRouterName, srcFaceUri, 0, rt);
@@ -479,7 +479,7 @@
   CoordinateLsa* destLsa = lsdb.findCoordinateLsa(destLsaKey);
 
   // Coordinate LSAs do not exist for these routers
-  if (srcLsa == NULL || destLsa == NULL) {
+  if (srcLsa == nullptr || destLsa == nullptr) {
     return UNKNOWN_DISTANCE;
   }
 
diff --git a/tests/publisher/publisher-fixture.hpp b/tests/publisher/publisher-fixture.hpp
index eae6486..eba000d 100644
--- a/tests/publisher/publisher-fixture.hpp
+++ b/tests/publisher/publisher-fixture.hpp
@@ -45,8 +45,8 @@
   void
   addAdjacency(AdjLsa& lsa, const std::string& name, const std::string& faceUri, double cost)
   {
-    Adjacent adjacency(name, faceUri, cost, Adjacent::STATUS_ACTIVE, 0, 0);
-    lsa.addAdjacent(adjacency);
+    Adjacent adjacency(name, ndn::util::FaceUri(faceUri), cost, Adjacent::STATUS_ACTIVE, 0, 0);
+    lsa.addAdjacent(std::move(adjacency));
   }
 
   void
@@ -77,7 +77,7 @@
 
     for (const Adjacent& adjacency : lsa.getAdl().getAdjList()) {
       BOOST_CHECK_EQUAL(it->getName(), adjacency.getName());
-      BOOST_CHECK_EQUAL(it->getUri(), adjacency.getConnectingFaceUri());
+      BOOST_CHECK_EQUAL(it->getUri(), adjacency.getFaceUri().toString());
       BOOST_CHECK_EQUAL(it->getCost(), adjacency.getLinkCost());
       ++it;
     }
diff --git a/tests/test-adjacency-list.cpp b/tests/test-adjacency-list.cpp
index 8e436ee..9a46a1c 100644
--- a/tests/test-adjacency-list.cpp
+++ b/tests/test-adjacency-list.cpp
@@ -29,14 +29,12 @@
 namespace nlsr {
 namespace test {
 
-using namespace std;
-
 BOOST_AUTO_TEST_SUITE(TestAdjacencyList)
 
 BOOST_AUTO_TEST_CASE(Basic)
 {
-  const string ADJ_NAME_1 = "testname";
-  const string ADJ_NAME_2 = "testname2";
+  const std::string ADJ_NAME_1 = "testname";
+  const std::string ADJ_NAME_2 = "testname2";
 
 //adjacent needed to test adjacency list.
   Adjacent adjacent1(ADJ_NAME_1);
@@ -57,13 +55,24 @@
   BOOST_CHECK(adjacentList1.isNeighbor("testname"));
   BOOST_CHECK_EQUAL(adjacentList1.isNeighbor("adjacent"), false);
 
-  string n1 = "testname";
+  std::string n1 = "testname";
   BOOST_CHECK_EQUAL(adjacentList1.getStatusOfNeighbor(n1), Adjacent::STATUS_INACTIVE);
 
   adjacentList1.setStatusOfNeighbor(n1, Adjacent::STATUS_ACTIVE);
   BOOST_CHECK_EQUAL(adjacentList1.getStatusOfNeighbor(n1), Adjacent::STATUS_ACTIVE);
 }
 
+BOOST_AUTO_TEST_CASE(findAdjacentByFaceUri)
+{
+  ndn::util::FaceUri faceUri("udp4://10.0.0.1:6363");
+  Adjacent adj1("/ndn/test/1", faceUri, 10, Adjacent::STATUS_INACTIVE, 0, 0);
+  AdjacencyList adjList;
+  adjList.insert(adj1);
+
+  std::list<Adjacent>::iterator adjIter = adjList.findAdjacent(faceUri);
+  BOOST_CHECK(adjIter != adjList.end());
+}
+
 BOOST_AUTO_TEST_CASE(AdjLsaIsBuildableWithOneNodeActive)
 {
   Adjacent adjacencyA("/router/A");
@@ -124,5 +133,5 @@
 
 BOOST_AUTO_TEST_SUITE_END()
 
-} // namespace tests
+} // namespace test
 } // namespace nlsr
diff --git a/tests/test-adjacent.cpp b/tests/test-adjacent.cpp
index 623023e..e494682 100644
--- a/tests/test-adjacent.cpp
+++ b/tests/test-adjacent.cpp
@@ -29,22 +29,60 @@
 
 using namespace std;
 
-BOOST_AUTO_TEST_SUITE(TestAdjacenct)
+BOOST_AUTO_TEST_SUITE(TestAdjacent)
 
-BOOST_AUTO_TEST_CASE(AdjacenctBasic)
+BOOST_AUTO_TEST_CASE(OperatorEquals)
 {
-  const string ADJ_NAME_1 = "testname";
-  const string ADJ_NAME_2 = "testname";
+  const ndn::Name ADJ_NAME_1 = "name1";
+  const ndn::util::FaceUri ADJ_URI_1 = ndn::util::FaceUri("udp4://10.0.0.1:8000");
+  const double ADJ_LINK_COST_1 = 1;
+  Adjacent adjacent1(ADJ_NAME_1);
+  Adjacent adjacent2(ADJ_NAME_1);
+  adjacent1.setFaceUri(ADJ_URI_1);
+  adjacent2.setFaceUri(ADJ_URI_1);
+  adjacent1.setLinkCost(ADJ_LINK_COST_1);
+  adjacent2.setLinkCost(ADJ_LINK_COST_1);
 
+  BOOST_CHECK(adjacent1 == adjacent2);
+}
+
+BOOST_AUTO_TEST_CASE(Accessors)
+{
+  const ndn::Name ADJ_NAME_1 = "name1";
+  Adjacent adjacent1(ADJ_NAME_1);
+
+  // Link cost should always be rounded up to the nearest integer.
+  // The library only acceps integral values for prefix registration.
+  adjacent1.setLinkCost(10.1);
+
+  BOOST_CHECK_EQUAL(adjacent1.getName(), "name1");
+  BOOST_CHECK_EQUAL(adjacent1.getLinkCost(), 11);
+}
+
+BOOST_AUTO_TEST_CASE(compareFaceUri)
+{
+  const ndn::Name ADJ_NAME_1 = "name1";
+  const ndn::Name ADJ_NAME_2 = "name2";
+  const ndn::util::FaceUri ADJ_URI_1 = ndn::util::FaceUri("udp4://10.0.0.1:8000");
   Adjacent adjacent1(ADJ_NAME_1);
   Adjacent adjacent2(ADJ_NAME_2);
-  BOOST_CHECK(adjacent1 == adjacent2);
+  adjacent1.setFaceUri(ADJ_URI_1);
+  adjacent2.setFaceUri(ADJ_URI_1);
 
-  adjacent1.setLinkCost(10.1);
-  BOOST_CHECK_EQUAL(adjacent1.getLinkCost(), 11);
+  BOOST_CHECK(adjacent1.compareFaceUri(adjacent2.getFaceUri()));
+}
 
-  BOOST_CHECK_EQUAL(adjacent1.getName(), "testname");
+BOOST_AUTO_TEST_CASE(compareFaceId)
+{
+  const ndn::Name ADJ_NAME_1 = "name1";
+  const ndn::Name ADJ_NAME_2 = "name2";
+  const uint64_t ADJ_FACEID_1 = 1;
+  Adjacent adjacent1(ADJ_NAME_1);
+  Adjacent adjacent2(ADJ_NAME_2);
+  adjacent1.setFaceId(ADJ_FACEID_1);
+  adjacent2.setFaceId(ADJ_FACEID_1);
 
+  BOOST_CHECK(adjacent1.compareFaceId(adjacent2.getFaceId()));
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/test-fib.cpp b/tests/test-fib.cpp
index 4b2229a..993a7a6 100644
--- a/tests/test-fib.cpp
+++ b/tests/test-fib.cpp
@@ -43,13 +43,13 @@
   {
     INIT_LOGGERS("/tmp", "DEBUG");
 
-    Adjacent neighbor1(router1Name, router1FaceUri, 0, Adjacent::STATUS_ACTIVE, 0, router1FaceId);
+    Adjacent neighbor1(router1Name, ndn::util::FaceUri(router1FaceUri), 0, Adjacent::STATUS_ACTIVE, 0, router1FaceId);
     adjacencies.insert(neighbor1);
 
-    Adjacent neighbor2(router2Name, router2FaceUri, 0, Adjacent::STATUS_ACTIVE, 0, router2FaceId);
+    Adjacent neighbor2(router2Name, ndn::util::FaceUri(router2FaceUri), 0, Adjacent::STATUS_ACTIVE, 0, router2FaceId);
     adjacencies.insert(neighbor2);
 
-    Adjacent neighbor3(router3Name, router3FaceUri, 0, Adjacent::STATUS_ACTIVE, 0, router3FaceId);
+    Adjacent neighbor3(router3Name, ndn::util::FaceUri(router3FaceUri), 0, Adjacent::STATUS_ACTIVE, 0, router3FaceId);
     adjacencies.insert(neighbor3);
 
     conf.setMaxFacesPerPrefix(2);
@@ -88,9 +88,9 @@
 const ndn::Name FibFixture::router2Name = "/ndn/router2";
 const ndn::Name FibFixture::router3Name = "/ndn/router3";
 
-const std::string FibFixture::router1FaceUri = "uri://face1";
-const std::string FibFixture::router2FaceUri = "uri://face2";
-const std::string FibFixture::router3FaceUri = "uri://face3";
+const std::string FibFixture::router1FaceUri = "udp4://10.0.0.1";
+const std::string FibFixture::router2FaceUri = "udp4://10.0.0.2";
+const std::string FibFixture::router3FaceUri = "udp4://10.0.0.3";
 
 const uint32_t FibFixture::router1FaceId = 1;
 const uint32_t FibFixture::router2FaceId = 2;
diff --git a/tests/test-hyperbolic-calculator.cpp b/tests/test-hyperbolic-calculator.cpp
index 84cfbf6..0001ae4 100644
--- a/tests/test-hyperbolic-calculator.cpp
+++ b/tests/test-hyperbolic-calculator.cpp
@@ -59,9 +59,9 @@
   {
     INIT_LOGGERS("/tmp", "TRACE");
 
-    Adjacent a(ROUTER_A_NAME, ROUTER_A_FACE, 0, Adjacent::STATUS_ACTIVE, 0, 0);
-    Adjacent b(ROUTER_B_NAME, ROUTER_B_FACE, 0, Adjacent::STATUS_ACTIVE, 0, 0);
-    Adjacent c(ROUTER_C_NAME, ROUTER_C_FACE, 0, Adjacent::STATUS_ACTIVE, 0, 0);
+    Adjacent a(ROUTER_A_NAME, ndn::util::FaceUri(ROUTER_A_FACE), 0, Adjacent::STATUS_ACTIVE, 0, 0);
+    Adjacent b(ROUTER_B_NAME, ndn::util::FaceUri(ROUTER_B_FACE), 0, Adjacent::STATUS_ACTIVE, 0, 0);
+    Adjacent c(ROUTER_C_NAME, ndn::util::FaceUri(ROUTER_C_FACE), 0, Adjacent::STATUS_ACTIVE, 0, 0);
 
     // Router A
     adjacencies.insert(b);
@@ -126,9 +126,9 @@
 const ndn::Name HyperbolicCalculatorFixture::ROUTER_B_NAME = "/ndn/router/b";
 const ndn::Name HyperbolicCalculatorFixture::ROUTER_C_NAME = "/ndn/router/c";
 
-const std::string HyperbolicCalculatorFixture::ROUTER_A_FACE = "face-a";
-const std::string HyperbolicCalculatorFixture::ROUTER_B_FACE = "face-b";
-const std::string HyperbolicCalculatorFixture::ROUTER_C_FACE = "face-c";
+const std::string HyperbolicCalculatorFixture::ROUTER_A_FACE = "udp4://10.0.0.1";
+const std::string HyperbolicCalculatorFixture::ROUTER_B_FACE = "udp4://10.0.0.2";
+const std::string HyperbolicCalculatorFixture::ROUTER_C_FACE = "udp4://10.0.0.3";
 
 uint64_t
 applyHyperbolicFactorAndRound(double d)
diff --git a/tests/test-link-state-calculator.cpp b/tests/test-link-state-calculator.cpp
index 6bbf472..50063a2 100644
--- a/tests/test-link-state-calculator.cpp
+++ b/tests/test-link-state-calculator.cpp
@@ -60,9 +60,9 @@
     conf.setRouterName("/a");
     conf.buildRouterPrefix();
 
-    Adjacent a(ROUTER_A_NAME, ROUTER_A_FACE, 0, Adjacent::STATUS_ACTIVE, 0, 0);
-    Adjacent b(ROUTER_B_NAME, ROUTER_B_FACE, 0, Adjacent::STATUS_ACTIVE, 0, 0);
-    Adjacent c(ROUTER_C_NAME, ROUTER_C_FACE, 0, Adjacent::STATUS_ACTIVE, 0, 0);
+    Adjacent a(ROUTER_A_NAME, ndn::util::FaceUri(ROUTER_A_FACE), 0, Adjacent::STATUS_ACTIVE, 0, 0);
+    Adjacent b(ROUTER_B_NAME, ndn::util::FaceUri(ROUTER_B_FACE), 0, Adjacent::STATUS_ACTIVE, 0, 0);
+    Adjacent c(ROUTER_C_NAME, ndn::util::FaceUri(ROUTER_C_FACE), 0, Adjacent::STATUS_ACTIVE, 0, 0);
 
     // Router A
     b.setLinkCost(LINK_AB_COST);
@@ -125,9 +125,9 @@
 const ndn::Name LinkStateCalculatorFixture::ROUTER_B_NAME = "/ndn/router/b";
 const ndn::Name LinkStateCalculatorFixture::ROUTER_C_NAME = "/ndn/router/c";
 
-const std::string LinkStateCalculatorFixture::ROUTER_A_FACE = "face-a";
-const std::string LinkStateCalculatorFixture::ROUTER_B_FACE = "face-b";
-const std::string LinkStateCalculatorFixture::ROUTER_C_FACE = "face-c";
+const std::string LinkStateCalculatorFixture::ROUTER_A_FACE = "udp4://10.0.0.1";
+const std::string LinkStateCalculatorFixture::ROUTER_B_FACE = "udp4://10.0.0.2";
+const std::string LinkStateCalculatorFixture::ROUTER_C_FACE = "udp4://10.0.0.3";
 
 const double LinkStateCalculatorFixture::LINK_AB_COST = 5;
 const double LinkStateCalculatorFixture::LINK_AC_COST = 10;
diff --git a/tests/test-lsa.cpp b/tests/test-lsa.cpp
index 642a317..d7c97f9 100644
--- a/tests/test-lsa.cpp
+++ b/tests/test-lsa.cpp
@@ -141,11 +141,11 @@
     "  Adjacents: \n"
     "    Adjacent 1:\n"
     "      Adjacent Name: /adjacent1\n"
-    "      Connecting FaceUri: \n"
+    "      Connecting FaceUri: ://\n"
     "      Link Cost: 10\n"
     "    Adjacent 2:\n"
     "      Adjacent Name: /adjacent2\n"
-    "      Connecting FaceUri: \n"
+    "      Connecting FaceUri: ://\n"
     "      Link Cost: 10\n"
     "adj_lsa_end";
 
@@ -167,8 +167,8 @@
   //If we don't do this the test will fail
   //Adjacent has default cost of 10 but no default
   //connecting face URI, so initializeFromContent fails
-  adj1.setConnectingFaceUri("10.0.0.1");
-  adj2.setConnectingFaceUri("10.0.0.2");
+  adj1.setFaceUri(ndn::util::FaceUri("udp://10.0.0.1"));
+  adj2.setFaceUri(ndn::util::FaceUri("udp://10.0.0.2"));
 
   AdjacencyList adjList;
   adjList.insert(adj1);
diff --git a/tests/test-name-prefix-table.cpp b/tests/test-name-prefix-table.cpp
index daaafe9..eca19f6 100644
--- a/tests/test-name-prefix-table.cpp
+++ b/tests/test-name-prefix-table.cpp
@@ -63,10 +63,10 @@
 
   NamePrefixTable& npt = nlsr.getNamePrefixTable();
 
-  Adjacent thisRouter(conf.getRouterPrefix(), "udp://face", 0, Adjacent::STATUS_ACTIVE, 0, 0);
+  Adjacent thisRouter(conf.getRouterPrefix(), ndn::util::FaceUri("udp4://10.0.0.1"), 0, Adjacent::STATUS_ACTIVE, 0, 0);
 
   ndn::Name buptRouterName("/ndn/cn/edu/bupt/%C1.Router/bupthub");
-  Adjacent bupt(buptRouterName, "udp://bupt", 0, Adjacent::STATUS_ACTIVE, 0, 0);
+  Adjacent bupt(buptRouterName, ndn::util::FaceUri("udp4://10.0.0.2"), 0, Adjacent::STATUS_ACTIVE, 0, 0);
 
   // This router's Adjacency LSA
   nlsr.getAdjacencyList().insert(bupt);
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index 3760289..78e0fb9 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -66,13 +66,13 @@
 BOOST_AUTO_TEST_CASE(HyperbolicOn_ZeroCostNeighbors)
 {
   // Simulate loading configuration file
-  Adjacent neighborA("/ndn/neighborA", "uri://faceA", 25, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborA("/ndn/neighborA", ndn::util::FaceUri("udp4://10.0.0.1"), 25, Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborA);
 
-  Adjacent neighborB("/ndn/neighborB", "uri://faceB", 10, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborB("/ndn/neighborB", ndn::util::FaceUri("udp4://10.0.0.2"), 10, Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborB);
 
-  Adjacent neighborC("/ndn/neighborC", "uri://faceC", 17, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborC("/ndn/neighborC", ndn::util::FaceUri("udp4://10.0.0.3"), 17, Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborC);
 
   nlsr.getConfParameter().setHyperbolicState(HYPERBOLIC_STATE_ON);
@@ -89,13 +89,13 @@
 BOOST_AUTO_TEST_CASE(HyperbolicOff_LinkStateCost)
 {
   // Simulate loading configuration file
-  Adjacent neighborA("/ndn/neighborA", "uri://faceA", 25, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborA("/ndn/neighborA", ndn::util::FaceUri("udp4://10.0.0.1"), 25, Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborA);
 
-  Adjacent neighborB("/ndn/neighborB", "uri://faceB", 10, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborB("/ndn/neighborB", ndn::util::FaceUri("udp4://10.0.0.2"), 10, Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborB);
 
-  Adjacent neighborC("/ndn/neighborC", "uri://faceC", 17, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborC("/ndn/neighborC", ndn::util::FaceUri("udp4://10.0.0.3"), 17, Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborC);
 
   nlsr.initialize();
@@ -143,12 +143,12 @@
   uint64_t destroyFaceId = 128;
 
   // Create a neighbor whose Face will be destroyed
-  Adjacent failNeighbor("/ndn/neighborA", "uri://faceA", 10, Adjacent::STATUS_ACTIVE, 0,
+  Adjacent failNeighbor("/ndn/neighborA", ndn::util::FaceUri("udp4://10.0.0.1"), 10, Adjacent::STATUS_ACTIVE, 0,
                         destroyFaceId);
   neighbors.insert(failNeighbor);
 
   // Create an additional neighbor so an adjacency LSA can be built after the face is destroyed
-  Adjacent otherNeighbor("/ndn/neighborB", "uri://faceB", 10, Adjacent::STATUS_ACTIVE, 0, 256);
+  Adjacent otherNeighbor("/ndn/neighborB", ndn::util::FaceUri("udp4://10.0.0.2"), 10, Adjacent::STATUS_ACTIVE, 0, 256);
   neighbors.insert(otherNeighbor);
 
   nlsr.initialize();
@@ -158,7 +158,7 @@
 
   // Set up adjacency LSAs
   // This router
-  Adjacent thisRouter(conf.getRouterPrefix(), "uri://faceB", 10, Adjacent::STATUS_ACTIVE, 0, 256);
+  Adjacent thisRouter(conf.getRouterPrefix(), ndn::util::FaceUri("udp4://10.0.0.3"), 10, Adjacent::STATUS_ACTIVE, 0, 256);
 
   AdjLsa ownAdjLsa(conf.getRouterPrefix(), 10, ndn::time::system_clock::now(), 1, neighbors);
   lsdb.installAdjLsa(ownAdjLsa);
@@ -256,12 +256,12 @@
   uint64_t destroyFaceId = 128;
 
   // Create an inactive neighbor whose Face will be destroyed
-  Adjacent failNeighbor("/ndn/neighborA", "uri://faceA", 10, Adjacent::STATUS_INACTIVE, 3,
+  Adjacent failNeighbor("/ndn/neighborA", ndn::util::FaceUri("udp4://10.0.0.1"), 10, Adjacent::STATUS_INACTIVE, 3,
                         destroyFaceId);
   neighbors.insert(failNeighbor);
 
   // Create an additional active neighbor so an adjacency LSA can be built
-  Adjacent otherNeighbor("/ndn/neighborB", "uri://faceB", 25, Adjacent::STATUS_ACTIVE, 0, 256);
+  Adjacent otherNeighbor("/ndn/neighborB", ndn::util::FaceUri("udp4://10.0.0.2"), 25, Adjacent::STATUS_ACTIVE, 0, 256);
   neighbors.insert(otherNeighbor);
 
   // Add a name for the neighbor to advertise
@@ -279,7 +279,7 @@
 
   // Set up adjacency LSAs
   // This router
-  Adjacent thisRouter(conf.getRouterPrefix(), "uri://faceB", 25, Adjacent::STATUS_ACTIVE, 0, 256);
+  Adjacent thisRouter(conf.getRouterPrefix(), ndn::util::FaceUri("udp4://10.0.0.2"), 25, Adjacent::STATUS_ACTIVE, 0, 256);
 
   AdjLsa ownAdjLsa(conf.getRouterPrefix(), 10, ndn::time::system_clock::now(), 1, neighbors);
   lsdb.installAdjLsa(ownAdjLsa);
@@ -398,12 +398,12 @@
   // Add neighbors
   // Router A
   ndn::Name neighborAName("/ndn/site/%C1.router/routerA");
-  Adjacent neighborA(neighborAName, "uri://faceA", 0, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborA(neighborAName, ndn::util::FaceUri("udp4://10.0.0.1"), 0, Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborA);
 
   // Router B
   ndn::Name neighborBName("/ndn/site/%C1.router/routerB");
-  Adjacent neighborB(neighborBName, "uri://faceA", 0, Adjacent::STATUS_INACTIVE, 0, 0);
+  Adjacent neighborB(neighborBName, ndn::util::FaceUri("udp4://10.0.0.1"), 0, Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborB);
 
   nlsr.initialize();
@@ -450,11 +450,13 @@
 BOOST_AUTO_TEST_CASE(CanonizeUris)
 {
   ndn::Name neighborAName("/ndn/site/%C1.router/routerA");
-  Adjacent neighborA(neighborAName, "udp://10.0.0.1", 0, Adjacent::STATUS_INACTIVE, 0, 0);
+  ndn::util::FaceUri faceUriA("udp://10.0.0.1");
+  Adjacent neighborA(neighborAName, faceUriA, 0, Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborA);
 
   ndn::Name neighborBName("/ndn/site/%C1.router/routerB");
-  Adjacent neighborB(neighborBName, "udp://10.0.0.2", 0, Adjacent::STATUS_INACTIVE, 0, 0);
+  ndn::util::FaceUri faceUriB("udp://10.0.0.2");
+  Adjacent neighborB(neighborBName, faceUriB, 0, Adjacent::STATUS_INACTIVE, 0, 0);
   neighbors.insert(neighborB);
 
   int nCanonizationsLeft = nlsr.getAdjacencyList().getAdjList().size();
@@ -471,11 +473,11 @@
     this->advanceClocks(ndn::time::milliseconds(1));
   }
 
-  BOOST_CHECK_EQUAL(nlsr.getAdjacencyList().getAdjacent(neighborAName).getConnectingFaceUri(),
-                    "udp4://10.0.0.1:6363");
+  BOOST_CHECK_EQUAL(nlsr.getAdjacencyList().getAdjacent(neighborAName).getFaceUri(),
+                    ndn::util::FaceUri("udp4://10.0.0.1:6363"));
 
-  BOOST_CHECK_EQUAL(nlsr.getAdjacencyList().getAdjacent(neighborBName).getConnectingFaceUri(),
-                    "udp4://10.0.0.2:6363");
+  BOOST_CHECK_EQUAL(nlsr.getAdjacencyList().getAdjacent(neighborBName).getFaceUri(),
+                    ndn::util::FaceUri("udp4://10.0.0.2:6363"));
 }
 
 BOOST_AUTO_TEST_SUITE_END()
