nlsr: refactor Adjacent to use FaceUri objects

Change-Id: Ib46f70570669c381572182eeea5c047a38a05104
refs: #4063
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()