src: Sort NextHops on NexthopList insertion

refs: #2721

Change-Id: I39893c5fb6b5fac93220901ab3190090f0d2cc57
diff --git a/tests/test-link-state-calculator.cpp b/tests/test-link-state-calculator.cpp
index 8cc00a7..e3a6b3e 100644
--- a/tests/test-link-state-calculator.cpp
+++ b/tests/test-link-state-calculator.cpp
@@ -244,7 +244,7 @@
   NexthopList& bHopList = entryB->getNexthopList();
   BOOST_REQUIRE_EQUAL(bHopList.getNextHops().size(), 1);
 
-  NextHop& nextHopForB = bHopList.getNextHops().front();
+  const NextHop& nextHopForB = *(bHopList.getNextHops().begin());
 
   BOOST_CHECK(nextHopForB.getConnectingFaceUri() == ROUTER_B_FACE &&
               nextHopForB.getRouteCostAsAdjustedInteger() == LINK_AB_COST);
@@ -256,7 +256,7 @@
   NexthopList& cHopList = entryC->getNexthopList();
   BOOST_REQUIRE_EQUAL(cHopList.getNextHops().size(), 1);
 
-  NextHop& nextHopForC = cHopList.getNextHops().front();
+  const NextHop& nextHopForC = *(cHopList.getNextHops().begin());
 
   BOOST_CHECK(nextHopForC.getConnectingFaceUri() == ROUTER_C_FACE &&
               nextHopForC.getRouteCostAsAdjustedInteger() == LINK_AC_COST);