route: Fix hyperbolic cost adjustment

refs: #1974

Change-Id: Ic96c94d978487bbef2804235b75aa227c350d941
diff --git a/tests/test-nexthop-list.cpp b/tests/test-nexthop-list.cpp
index eeea461..e4e8bc7 100644
--- a/tests/test-nexthop-list.cpp
+++ b/tests/test-nexthop-list.cpp
@@ -43,7 +43,7 @@
   BOOST_CHECK_EQUAL(nhl1.getSize(), (uint32_t)0);
 }
 
-BOOST_AUTO_TEST_CASE(RemoveNextHop)
+BOOST_AUTO_TEST_CASE(LinkStateRemoveNextHop)
 {
   NextHop hop1;
   hop1.setRouteCost(12.34);
@@ -52,6 +52,28 @@
   hopList.addNextHop(hop1);
 
   NextHop hop2;
+  hop2.setRouteCost(13.01);
+
+  BOOST_REQUIRE_EQUAL(hopList.getSize(), 1);
+
+  hopList.removeNextHop(hop2);
+  BOOST_CHECK_EQUAL(hopList.getSize(), 1);
+
+  hopList.removeNextHop(hop1);
+  BOOST_CHECK_EQUAL(hopList.getSize(), 0);
+}
+
+BOOST_AUTO_TEST_CASE(HyperbolicRemoveNextHop)
+{
+  NextHop hop1;
+  hop1.setHyperbolic(true);
+  hop1.setRouteCost(12.34);
+
+  NexthopList hopList;
+  hopList.addNextHop(hop1);
+
+  NextHop hop2;
+  hop2.setHyperbolic(true);
   hop2.setRouteCost(12.35);
 
   BOOST_REQUIRE_EQUAL(hopList.getSize(), 1);