nlsr: refactor AdjacencyList to use iterators instead of bare ptrs

Change-Id: I42225ee63c3d64eb80e58bc51c8d1afd20dd2ce2
refs: #4068
diff --git a/tests/test-link-state-calculator.cpp b/tests/test-link-state-calculator.cpp
index f4fffb6..6bbf472 100644
--- a/tests/test-link-state-calculator.cpp
+++ b/tests/test-link-state-calculator.cpp
@@ -179,8 +179,8 @@
   AdjLsa* lsa = nlsr.getLsdb().findAdjLsa(key);
   BOOST_REQUIRE(lsa != nullptr);
 
-  Adjacent* c = lsa->getAdl().findAdjacent(ROUTER_C_NAME);
-  BOOST_REQUIRE(c != nullptr);
+  auto c = lsa->getAdl().findAdjacent(ROUTER_C_NAME);
+  BOOST_REQUIRE(c != nlsr.getAdjacencyList().end());
 
   double higherLinkCost = LINK_BC_COST + 1;
   c->setLinkCost(higherLinkCost);
@@ -228,8 +228,8 @@
   AdjLsa* lsa = nlsr.getLsdb().findAdjLsa(key);
   BOOST_REQUIRE(lsa != nullptr);
 
-  Adjacent* c = lsa->getAdl().findAdjacent(ROUTER_C_NAME);
-  BOOST_REQUIRE(c != nullptr);
+  auto c = lsa->getAdl().findAdjacent(ROUTER_C_NAME);
+  BOOST_REQUIRE(c != nlsr.getAdjacencyList().end());
 
   c->setLinkCost(0);