diff --git a/tests/lsa/test-adj-lsa.cpp b/tests/lsa/test-adj-lsa.cpp
new file mode 100644
index 0000000..3effb97
--- /dev/null
+++ b/tests/lsa/test-adj-lsa.cpp
@@ -0,0 +1,191 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2014-2023,  The University of Memphis,
+ *                           Regents of the University of California,
+ *                           Arizona Board of Regents.
+ *
+ * This file is part of NLSR (Named-data Link State Routing).
+ * See AUTHORS.md for complete list of NLSR authors and contributors.
+ *
+ * NLSR is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * 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/>.
+ */
+
+#include "lsa/adj-lsa.hpp"
+
+#include "tests/boost-test.hpp"
+
+namespace nlsr::test {
+
+BOOST_AUTO_TEST_SUITE(TestAdjLsa)
+
+const uint8_t ADJ_LSA1[] = {
+  0x83, 0x58, 0x80, 0x2D, 0x07, 0x13, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04, 0x73, 0x69,
+  0x74, 0x65, 0x08, 0x06, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x82, 0x01, 0x0C, 0x8B, 0x13,
+  0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36, 0x20, 0x30, 0x34, 0x3A, 0x31,
+  0x33, 0x3A, 0x33, 0x34, 0x84, 0x27, 0x07, 0x16, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04,
+  0x73, 0x69, 0x74, 0x65, 0x08, 0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79,
+  0x8D, 0x03, 0x3A, 0x2F, 0x2F, 0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t ADJ_LSA_EXTRA_NEIGHBOR[] = {
+  0x83, 0x80, 0x80, 0x2D, 0x07, 0x13, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04, 0x73, 0x69,
+  0x74, 0x65, 0x08, 0x06, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x82, 0x01, 0x0C, 0x8B, 0x13,
+  0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36, 0x20, 0x30, 0x34, 0x3A, 0x31,
+  0x33, 0x3A, 0x33, 0x34, 0x84, 0x27, 0x07, 0x16, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04,
+  0x73, 0x69, 0x74, 0x65, 0x08, 0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79,
+  0x8D, 0x03, 0x3A, 0x2F, 0x2F, 0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x84, 0x26, 0x07, 0x15, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x03, 0x65, 0x64, 0x75, 0x08,
+  0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79, 0x8D, 0x03, 0x3A, 0x2F, 0x2F,
+  0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t ADJ_LSA_DIFF_SEQ[] = {
+  0x83, 0x80, 0x80, 0x2D, 0x07, 0x13, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04, 0x73, 0x69,
+  0x74, 0x65, 0x08, 0x06, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x82, 0x01, 0x0E, 0x8B, 0x13,
+  0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36, 0x20, 0x30, 0x34, 0x3A, 0x31,
+  0x33, 0x3A, 0x33, 0x34, 0x84, 0x27, 0x07, 0x16, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04,
+  0x73, 0x69, 0x74, 0x65, 0x08, 0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79,
+  0x8D, 0x03, 0x3A, 0x2F, 0x2F, 0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x84, 0x26, 0x07, 0x15, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x03, 0x65, 0x64, 0x75, 0x08,
+  0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79, 0x8D, 0x03, 0x3A, 0x2F, 0x2F,
+  0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+
+const uint8_t ADJ_LSA_DIFF_TS[] = {
+  0x83, 0x80, 0x80, 0x2D, 0x07, 0x13, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04, 0x73, 0x69,
+  0x74, 0x65, 0x08, 0x06, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x82, 0x01, 0x0E, 0x8B, 0x13,
+  0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36, 0x20, 0x30, 0x34, 0x3A, 0x31,
+  0x33, 0x3A, 0x34, 0x34, 0x84, 0x27, 0x07, 0x16, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04,
+  0x73, 0x69, 0x74, 0x65, 0x08, 0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79,
+  0x8D, 0x03, 0x3A, 0x2F, 0x2F, 0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x84, 0x26, 0x07, 0x15, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x03, 0x65, 0x64, 0x75, 0x08,
+  0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79, 0x8D, 0x03, 0x3A, 0x2F, 0x2F,
+  0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+BOOST_AUTO_TEST_CASE(Basic)
+{
+  ndn::Name routerName("/ndn/site/router");
+  ndn::Name adjacencyName("/ndn/site/adjacency");
+  auto testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
+  uint32_t seqNo = 12;
+
+  // An AdjLsa initialized with ACTIVE adjacencies should copy the adjacencies
+  AdjacencyList activeAdjacencies;
+  Adjacent activeAdjacency(adjacencyName);
+  activeAdjacency.setStatus(Adjacent::STATUS_ACTIVE);
+  activeAdjacencies.insert(activeAdjacency);
+
+  AdjLsa alsa1(routerName, seqNo, testTimePoint,
+               activeAdjacencies.size(), activeAdjacencies);
+  BOOST_CHECK_EQUAL(alsa1.getAdl().size(), 1);
+  BOOST_CHECK_EQUAL(alsa1.getType(), Lsa::Type::ADJACENCY);
+  BOOST_CHECK_EQUAL(alsa1.getSeqNo(), seqNo);
+  BOOST_CHECK_EQUAL(alsa1.getExpirationTimePoint(), testTimePoint);
+  BOOST_CHECK_EQUAL(alsa1.getNoLink(), 1);
+  BOOST_CHECK(alsa1.getAdl().isNeighbor(activeAdjacency.getName()));
+
+  // An AdjLsa initialized with INACTIVE adjacencies should not copy the adjacencies
+  AdjacencyList inactiveAdjacencies;
+  Adjacent inactiveAdjacency(adjacencyName);
+  inactiveAdjacency.setStatus(Adjacent::STATUS_INACTIVE);
+  inactiveAdjacencies.insert(inactiveAdjacency);
+
+  AdjLsa alsa2(routerName, seqNo, testTimePoint,
+               inactiveAdjacencies.size(), inactiveAdjacencies);
+  BOOST_CHECK_EQUAL(alsa2.getAdl().size(), 0);
+
+  // Thus, the two LSAs should not have equal content
+  BOOST_CHECK_EQUAL(alsa1.isEqualContent(alsa2), false);
+
+  // Create a duplicate of alsa1 which should have equal content
+  AdjLsa alsa3(routerName, seqNo, testTimePoint,
+               activeAdjacencies.size(), activeAdjacencies);
+  BOOST_CHECK(alsa1.isEqualContent(alsa3));
+
+  auto wire = alsa1.wireEncode();
+  BOOST_TEST(wire == ADJ_LSA1, boost::test_tools::per_element());
+
+  Adjacent activeAdjacency2("/ndn/edu/adjacency");
+  activeAdjacency2.setStatus(Adjacent::STATUS_ACTIVE);
+  alsa1.addAdjacent(activeAdjacency2);
+  wire = alsa1.wireEncode();
+  BOOST_TEST(wire == ADJ_LSA_EXTRA_NEIGHBOR, boost::test_tools::per_element());
+
+  alsa1.setSeqNo(14);
+  wire = alsa1.wireEncode();
+  BOOST_TEST(wire == ADJ_LSA_DIFF_SEQ, boost::test_tools::per_element());
+
+  testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196024993));
+  alsa1.setExpirationTimePoint(testTimePoint);
+  wire = alsa1.wireEncode();
+  BOOST_TEST(wire == ADJ_LSA_DIFF_TS, boost::test_tools::per_element());
+}
+
+BOOST_AUTO_TEST_CASE(IncrementAdjacentNumber)
+{
+  Adjacent adj1("adjacent1");
+  Adjacent adj2("adjacent2");
+
+  adj1.setStatus(Adjacent::STATUS_ACTIVE);
+  adj2.setStatus(Adjacent::STATUS_ACTIVE);
+
+  AdjacencyList adjList;
+  adjList.insert(adj1);
+  adjList.insert(adj2);
+
+  auto testTimePoint = ndn::time::system_clock::now() + ndn::time::seconds(3600);
+
+  AdjLsa lsa("router1", 12, testTimePoint, adjList.size(), adjList);
+
+  std::ostringstream os;
+  os << lsa;
+
+  std::string EXPECTED_OUTPUT =
+    "    ADJACENCY LSA:\n"
+    "      Origin Router      : /router1\n"
+    "      Sequence Number    : 12\n"
+    "      Expires in         : 3599999 milliseconds\n"
+    "      Adjacent(s):\n"
+    "        Adjacent 0: (name=/adjacent1, uri=://, cost=10)\n"
+    "        Adjacent 1: (name=/adjacent2, uri=://, cost=10)\n";
+
+  BOOST_CHECK_EQUAL(os.str(), EXPECTED_OUTPUT);
+}
+
+BOOST_AUTO_TEST_CASE(InitializeFromContent)
+{
+  Adjacent adj1("adjacent1");
+  Adjacent adj2("adjacent2");
+
+  adj1.setStatus(Adjacent::STATUS_ACTIVE);
+  adj2.setStatus(Adjacent::STATUS_ACTIVE);
+
+  //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.setFaceUri(ndn::FaceUri("udp://10.0.0.1"));
+  adj2.setFaceUri(ndn::FaceUri("udp://10.0.0.2"));
+
+  AdjacencyList adjList;
+  adjList.insert(adj1);
+  adjList.insert(adj2);
+
+  auto testTimePoint = ndn::time::system_clock::now();
+
+  AdjLsa adjlsa1("router1", 1, testTimePoint, adjList.size(), adjList);
+  AdjLsa adjlsa2(adjlsa1.wireEncode());
+  BOOST_CHECK(adjlsa1.isEqualContent(adjlsa2));
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace nlsr::test
diff --git a/tests/lsa/test-coordinate-lsa.cpp b/tests/lsa/test-coordinate-lsa.cpp
new file mode 100644
index 0000000..182665d
--- /dev/null
+++ b/tests/lsa/test-coordinate-lsa.cpp
@@ -0,0 +1,137 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2014-2023,  The University of Memphis,
+ *                           Regents of the University of California,
+ *                           Arizona Board of Regents.
+ *
+ * This file is part of NLSR (Named-data Link State Routing).
+ * See AUTHORS.md for complete list of NLSR authors and contributors.
+ *
+ * NLSR is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * 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/>.
+ */
+
+#include "lsa/coordinate-lsa.hpp"
+
+#include "tests/boost-test.hpp"
+
+namespace nlsr::test {
+
+/*
+static void
+printBytes(ndn::span<const uint8_t> buf)
+{
+  std::string hex = ndn::toHex(buf);
+
+  for (size_t i = 0; i < hex.size(); i++) {
+    if (i > 0 && i % 30 == 0)
+      std::cout << "\n  ";
+
+    std::cout << "0x" << hex[i];
+    std::cout << hex[++i];
+
+    if ((i + 1) != hex.size())
+      std::cout << ", ";
+  }
+  std::cout << "\n" << "};" << std::endl;
+}
+
+printBytes(block);
+*/
+
+BOOST_AUTO_TEST_SUITE(TestCoordinateLsa)
+
+const uint8_t COORDINATE_LSA1[] = {
+  0x85, 0x43, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
+  0x82, 0x01, 0x0C, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
+  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x87, 0x08, 0x40, 0x04, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x88, 0x08, 0x40, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88,
+  0x08, 0x40, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t COORDINATE_LSA_DIFF_ANGLE[] = {
+  0x85, 0x39, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
+  0x82, 0x01, 0x0C, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
+  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x87, 0x08, 0x40, 0x04, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x88, 0x08, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t COORDINATE_LSA_DIFF_RADIUS[] = {
+  0x85, 0x39, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
+  0x82, 0x01, 0x0C, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
+  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x87, 0x08, 0x40, 0x02, 0x66, 0x66,
+  0x66, 0x66, 0x66, 0x66, 0x88, 0x08, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t COORDINATE_LSA_DIFF_SEQ[] = {
+  0x85, 0x39, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
+  0x82, 0x01, 0x0E, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
+  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x87, 0x08, 0x40, 0x02, 0x66, 0x66,
+  0x66, 0x66, 0x66, 0x66, 0x88, 0x08, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t COORDINATE_LSA_DIFF_TS[] = {
+  0x85, 0x39, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
+  0x82, 0x01, 0x0E, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
+  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x34, 0x34, 0x87, 0x08, 0x40, 0x02, 0x66, 0x66,
+  0x66, 0x66, 0x66, 0x66, 0x88, 0x08, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+BOOST_AUTO_TEST_CASE(Basic)
+{
+  auto testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
+  std::vector<double> angles1{30.0}, angles2{30.0};
+  angles1.push_back(30.0);
+  angles2.push_back(30.0);
+  CoordinateLsa clsa1("router1", 12, testTimePoint, 2.5, angles1);
+  CoordinateLsa clsa2("router1", 12, testTimePoint, 2.5, angles2);
+
+  BOOST_CHECK_CLOSE(clsa1.getCorRadius(), 2.5, 0.0001);
+  BOOST_CHECK(clsa1.getCorTheta() == angles1);
+
+  BOOST_CHECK(clsa1.isEqualContent(clsa2));
+
+  BOOST_CHECK_EQUAL(clsa1.wireEncode(), clsa2.wireEncode());
+
+  auto wire = clsa1.wireEncode();
+  BOOST_TEST(wire == COORDINATE_LSA1, boost::test_tools::per_element());
+
+  std::vector<double> angles3{40.0};
+  clsa1.setCorTheta(angles3);
+  wire = clsa1.wireEncode();
+  BOOST_TEST(wire == COORDINATE_LSA_DIFF_ANGLE, boost::test_tools::per_element());
+
+  clsa1.setCorRadius(2.3);
+  wire = clsa1.wireEncode();
+  BOOST_TEST(wire == COORDINATE_LSA_DIFF_RADIUS, boost::test_tools::per_element());
+
+  clsa1.setSeqNo(14);
+  wire = clsa1.wireEncode();
+  BOOST_TEST(wire == COORDINATE_LSA_DIFF_SEQ, boost::test_tools::per_element());
+
+  testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196024993));
+  clsa1.setExpirationTimePoint(testTimePoint);
+  wire = clsa1.wireEncode();
+  BOOST_TEST(wire == COORDINATE_LSA_DIFF_TS, boost::test_tools::per_element());
+}
+
+BOOST_AUTO_TEST_CASE(InitializeFromContent)
+{
+  auto testTimePoint = ndn::time::system_clock::now();
+  std::vector<double> angles = {30, 40.0};
+  CoordinateLsa clsa1("router1", 12, testTimePoint, 2.5, angles);
+  CoordinateLsa clsa2(clsa1.wireEncode());
+  BOOST_CHECK_EQUAL(clsa1.wireEncode(), clsa2.wireEncode());
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace nlsr::test
diff --git a/tests/lsa/test-name-lsa.cpp b/tests/lsa/test-name-lsa.cpp
new file mode 100644
index 0000000..3438931
--- /dev/null
+++ b/tests/lsa/test-name-lsa.cpp
@@ -0,0 +1,162 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2014-2023,  The University of Memphis,
+ *                           Regents of the University of California,
+ *                           Arizona Board of Regents.
+ *
+ * This file is part of NLSR (Named-data Link State Routing).
+ * See AUTHORS.md for complete list of NLSR authors and contributors.
+ *
+ * NLSR is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * 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/>.
+ */
+
+#include "lsa/name-lsa.hpp"
+
+#include "tests/boost-test.hpp"
+
+namespace nlsr::test {
+
+BOOST_AUTO_TEST_SUITE(TestNameLsa)
+
+const uint8_t NAME_LSA1[] = {
+  0x89, 0x37, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
+  0x82, 0x01, 0x0C, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
+  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61,
+  0x6D, 0x65, 0x31, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61, 0x6D, 0x65, 0x32
+};
+
+const uint8_t NAME_LSA_EXTRA_NAME[] = {
+  0x89, 0x40, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
+  0x82, 0x01, 0x0C, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
+  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61,
+  0x6D, 0x65, 0x31, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61, 0x6D, 0x65, 0x32, 0x07, 0x07, 0x08,
+  0x05, 0x6E, 0x61, 0x6D, 0x65, 0x33
+};
+
+const uint8_t NAME_LSA_DIFF_SEQ[] = {
+  0x89, 0x40, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
+  0x82, 0x01, 0x0E, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
+  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61,
+  0x6D, 0x65, 0x31, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61, 0x6D, 0x65, 0x32, 0x07, 0x07, 0x08,
+  0x05, 0x6E, 0x61, 0x6D, 0x65, 0x33
+};
+
+const uint8_t NAME_LSA_DIFF_TS[] = {
+  0x89, 0x40, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
+  0x82, 0x01, 0x0E, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
+  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x34, 0x34, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61,
+  0x6D, 0x65, 0x31, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61, 0x6D, 0x65, 0x32, 0x07, 0x07, 0x08,
+  0x05, 0x6E, 0x61, 0x6D, 0x65, 0x33
+};
+
+BOOST_AUTO_TEST_CASE(Basic)
+{
+  ndn::Name s1{"name1"};
+  ndn::Name s2{"name2"};
+  NamePrefixList npl1{s1, s2};
+
+  auto testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
+
+  // 3rd argument is seqNo
+  NameLsa nlsa1("router1", 12, testTimePoint, npl1);
+  NameLsa nlsa2("router2", 12, testTimePoint, npl1);
+
+  BOOST_CHECK_EQUAL(nlsa1.getType(), Lsa::Type::NAME);
+  BOOST_CHECK(nlsa1.getExpirationTimePoint() == nlsa2.getExpirationTimePoint());
+
+  auto wire = nlsa1.wireEncode();
+  BOOST_TEST(wire == NAME_LSA1, boost::test_tools::per_element());
+
+  nlsa1.addName("name3");
+  wire = nlsa1.wireEncode();
+  BOOST_TEST(wire == NAME_LSA_EXTRA_NAME, boost::test_tools::per_element());
+
+  nlsa1.setSeqNo(14);
+  wire = nlsa1.wireEncode();
+  BOOST_TEST(wire == NAME_LSA_DIFF_SEQ, boost::test_tools::per_element());
+
+  testTimePoint =
+    ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196024993));
+  nlsa1.setExpirationTimePoint(testTimePoint);
+  wire = nlsa1.wireEncode();
+  BOOST_TEST(wire == NAME_LSA_DIFF_TS, boost::test_tools::per_element());
+
+  // Not testing router name as not sure if that will ever change once set
+}
+
+BOOST_AUTO_TEST_CASE(InitializeFromContent)
+{
+  auto testTimePoint = ndn::time::system_clock::now();
+  ndn::Name s1{"name1"};
+  ndn::Name s2{"name2"};
+  NamePrefixList npl1{s1, s2};
+
+  NameLsa nlsa1("router1", 1, testTimePoint, npl1);
+  NameLsa nlsa2(nlsa1.wireEncode());
+  BOOST_CHECK_EQUAL(nlsa1.wireEncode(), nlsa2.wireEncode());
+}
+
+BOOST_AUTO_TEST_CASE(OperatorEquals)
+{
+  NameLsa lsa1;
+  NameLsa lsa2;
+  ndn::Name name1("/ndn/test/name1");
+  ndn::Name name2("/ndn/test/name2");
+  ndn::Name name3("/ndn/some/other/name1");
+
+  lsa1.addName(name1);
+  lsa1.addName(name2);
+  lsa1.addName(name3);
+
+  lsa2.addName(name1);
+  lsa2.addName(name2);
+  lsa2.addName(name3);
+
+  BOOST_CHECK(lsa1.isEqualContent(lsa2));
+}
+
+BOOST_AUTO_TEST_CASE(Update)
+{
+  NameLsa knownNameLsa;
+  knownNameLsa.m_originRouter = ndn::Name("/yoursunny/_/%C1.Router/dal");
+  knownNameLsa.m_seqNo = 2683;
+  knownNameLsa.setExpirationTimePoint(ndn::time::system_clock::now() + 3561_ms);
+  knownNameLsa.addName("/yoursunny/_/dal");
+  knownNameLsa.addName("/ndn");
+
+  auto rcvdLsa = std::make_shared<NameLsa>();
+  rcvdLsa->m_originRouter = ndn::Name("/yoursunny/_/%C1.Router/dal");
+  rcvdLsa->m_seqNo = 2684;
+  rcvdLsa->setExpirationTimePoint(ndn::time::system_clock::now() + 3600_ms);
+
+  auto nlsa = std::static_pointer_cast<NameLsa>(rcvdLsa);
+  nlsa->addName("/ndn");
+  nlsa->addName("/yoursunny/_/dal");
+  ndn::Name addedName1("/yoursunny/video/ndn-dpdk_acmicn20_20200917");
+  ndn::Name addedName2("/yoursunny/pushups");
+  nlsa->addName(addedName1);
+  nlsa->addName(addedName2);
+
+  auto [updated, namesToAdd, namesToRemove] = knownNameLsa.update(rcvdLsa);
+
+  BOOST_CHECK_EQUAL(updated, true);
+  BOOST_CHECK_EQUAL(namesToAdd.size(), 2);
+  BOOST_CHECK_EQUAL(namesToRemove.size(), 0);
+  auto it = std::find(namesToAdd.begin(), namesToAdd.end(), addedName1);
+  BOOST_CHECK(it != namesToAdd.end());
+  it = std::find(namesToAdd.begin(), namesToAdd.end(), addedName2);
+  BOOST_CHECK(it != namesToAdd.end());
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace nlsr::test
diff --git a/tests/test-lsa.cpp b/tests/test-lsa.cpp
deleted file mode 100644
index 1e89d9f..0000000
--- a/tests/test-lsa.cpp
+++ /dev/null
@@ -1,427 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2014-2022,  The University of Memphis,
- *                           Regents of the University of California,
- *                           Arizona Board of Regents.
- *
- * This file is part of NLSR (Named-data Link State Routing).
- * See AUTHORS.md for complete list of NLSR authors and contributors.
- *
- * NLSR is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * 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/>.
- */
-
-#include "lsa/name-lsa.hpp"
-#include "lsa/adj-lsa.hpp"
-#include "lsa/coordinate-lsa.hpp"
-#include "adjacent.hpp"
-#include "name-prefix-list.hpp"
-
-#include "tests/boost-test.hpp"
-
-namespace nlsr {
-namespace test {
-
-/*
-static void
-printBytes(ndn::span<const uint8_t> buf)
-{
-  std::string hex = ndn::toHex(buf);
-
-  for (size_t i = 0; i < hex.size(); i++) {
-    if (i > 0 && i % 30 == 0)
-      std::cout << "\n  ";
-
-    std::cout << "0x" << hex[i];
-    std::cout << hex[++i];
-
-    if ((i + 1) != hex.size())
-      std::cout << ", ";
-  }
-  std::cout << "\n" << "};" << std::endl;
-}
-
-printBytes(block);
-*/
-
-BOOST_AUTO_TEST_SUITE(TestLsa)
-
-const uint8_t NAME_LSA1[] = {
-  0x89, 0x37, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
-  0x82, 0x01, 0x0C, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
-  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61,
-  0x6D, 0x65, 0x31, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61, 0x6D, 0x65, 0x32
-};
-
-const uint8_t NAME_LSA_EXTRA_NAME[] = {
-  0x89, 0x40, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
-  0x82, 0x01, 0x0C, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
-  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61,
-  0x6D, 0x65, 0x31, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61, 0x6D, 0x65, 0x32, 0x07, 0x07, 0x08,
-  0x05, 0x6E, 0x61, 0x6D, 0x65, 0x33
-};
-
-const uint8_t NAME_LSA_DIFF_SEQ[] = {
-  0x89, 0x40, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
-  0x82, 0x01, 0x0E, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
-  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61,
-  0x6D, 0x65, 0x31, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61, 0x6D, 0x65, 0x32, 0x07, 0x07, 0x08,
-  0x05, 0x6E, 0x61, 0x6D, 0x65, 0x33
-};
-
-const uint8_t NAME_LSA_DIFF_TS[] = {
-  0x89, 0x40, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
-  0x82, 0x01, 0x0E, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
-  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x34, 0x34, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61,
-  0x6D, 0x65, 0x31, 0x07, 0x07, 0x08, 0x05, 0x6E, 0x61, 0x6D, 0x65, 0x32, 0x07, 0x07, 0x08,
-  0x05, 0x6E, 0x61, 0x6D, 0x65, 0x33
-};
-
-BOOST_AUTO_TEST_CASE(NameLsaBasic)
-{
-  ndn::Name s1{"name1"};
-  ndn::Name s2{"name2"};
-  NamePrefixList npl1{s1, s2};
-
-  auto testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
-
-  // 3rd argument is seqNo
-  NameLsa nlsa1("router1", 12, testTimePoint, npl1);
-  NameLsa nlsa2("router2", 12, testTimePoint, npl1);
-
-  BOOST_CHECK_EQUAL(nlsa1.getType(), Lsa::Type::NAME);
-  BOOST_CHECK(nlsa1.getExpirationTimePoint() == nlsa2.getExpirationTimePoint());
-
-  auto wire = nlsa1.wireEncode();
-  BOOST_TEST(wire == NAME_LSA1, boost::test_tools::per_element());
-
-  nlsa1.addName("name3");
-  wire = nlsa1.wireEncode();
-  BOOST_TEST(wire == NAME_LSA_EXTRA_NAME, boost::test_tools::per_element());
-
-  nlsa1.setSeqNo(14);
-  wire = nlsa1.wireEncode();
-  BOOST_TEST(wire == NAME_LSA_DIFF_SEQ, boost::test_tools::per_element());
-
-  testTimePoint =
-    ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196024993));
-  nlsa1.setExpirationTimePoint(testTimePoint);
-  wire = nlsa1.wireEncode();
-  BOOST_TEST(wire == NAME_LSA_DIFF_TS, boost::test_tools::per_element());
-
-  // Not testing router name as not sure if that will ever change once set
-}
-
-const uint8_t ADJ_LSA1[] = {
-  0x83, 0x58, 0x80, 0x2D, 0x07, 0x13, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04, 0x73, 0x69,
-  0x74, 0x65, 0x08, 0x06, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x82, 0x01, 0x0C, 0x8B, 0x13,
-  0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36, 0x20, 0x30, 0x34, 0x3A, 0x31,
-  0x33, 0x3A, 0x33, 0x34, 0x84, 0x27, 0x07, 0x16, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04,
-  0x73, 0x69, 0x74, 0x65, 0x08, 0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79,
-  0x8D, 0x03, 0x3A, 0x2F, 0x2F, 0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-const uint8_t ADJ_LSA_EXTRA_NEIGHBOR[] = {
-  0x83, 0x80, 0x80, 0x2D, 0x07, 0x13, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04, 0x73, 0x69,
-  0x74, 0x65, 0x08, 0x06, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x82, 0x01, 0x0C, 0x8B, 0x13,
-  0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36, 0x20, 0x30, 0x34, 0x3A, 0x31,
-  0x33, 0x3A, 0x33, 0x34, 0x84, 0x27, 0x07, 0x16, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04,
-  0x73, 0x69, 0x74, 0x65, 0x08, 0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79,
-  0x8D, 0x03, 0x3A, 0x2F, 0x2F, 0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x84, 0x26, 0x07, 0x15, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x03, 0x65, 0x64, 0x75, 0x08,
-  0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79, 0x8D, 0x03, 0x3A, 0x2F, 0x2F,
-  0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-const uint8_t ADJ_LSA_DIFF_SEQ[] = {
-  0x83, 0x80, 0x80, 0x2D, 0x07, 0x13, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04, 0x73, 0x69,
-  0x74, 0x65, 0x08, 0x06, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x82, 0x01, 0x0E, 0x8B, 0x13,
-  0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36, 0x20, 0x30, 0x34, 0x3A, 0x31,
-  0x33, 0x3A, 0x33, 0x34, 0x84, 0x27, 0x07, 0x16, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04,
-  0x73, 0x69, 0x74, 0x65, 0x08, 0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79,
-  0x8D, 0x03, 0x3A, 0x2F, 0x2F, 0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x84, 0x26, 0x07, 0x15, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x03, 0x65, 0x64, 0x75, 0x08,
-  0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79, 0x8D, 0x03, 0x3A, 0x2F, 0x2F,
-  0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-const uint8_t ADJ_LSA_DIFF_TS[] = {
-  0x83, 0x80, 0x80, 0x2D, 0x07, 0x13, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04, 0x73, 0x69,
-  0x74, 0x65, 0x08, 0x06, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x82, 0x01, 0x0E, 0x8B, 0x13,
-  0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36, 0x20, 0x30, 0x34, 0x3A, 0x31,
-  0x33, 0x3A, 0x34, 0x34, 0x84, 0x27, 0x07, 0x16, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x04,
-  0x73, 0x69, 0x74, 0x65, 0x08, 0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79,
-  0x8D, 0x03, 0x3A, 0x2F, 0x2F, 0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x84, 0x26, 0x07, 0x15, 0x08, 0x03, 0x6E, 0x64, 0x6E, 0x08, 0x03, 0x65, 0x64, 0x75, 0x08,
-  0x09, 0x61, 0x64, 0x6A, 0x61, 0x63, 0x65, 0x6E, 0x63, 0x79, 0x8D, 0x03, 0x3A, 0x2F, 0x2F,
-  0x8C, 0x08, 0x40, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-BOOST_AUTO_TEST_CASE(AdjLsaBasic)
-{
-  ndn::Name routerName("/ndn/site/router");
-  ndn::Name adjacencyName("/ndn/site/adjacency");
-  auto testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
-  uint32_t seqNo = 12;
-
-  // An AdjLsa initialized with ACTIVE adjacencies should copy the adjacencies
-  AdjacencyList activeAdjacencies;
-  Adjacent activeAdjacency(adjacencyName);
-  activeAdjacency.setStatus(Adjacent::STATUS_ACTIVE);
-  activeAdjacencies.insert(activeAdjacency);
-
-  AdjLsa alsa1(routerName, seqNo, testTimePoint,
-               activeAdjacencies.size(), activeAdjacencies);
-  BOOST_CHECK_EQUAL(alsa1.getAdl().size(), 1);
-  BOOST_CHECK_EQUAL(alsa1.getType(), Lsa::Type::ADJACENCY);
-  BOOST_CHECK_EQUAL(alsa1.getSeqNo(), seqNo);
-  BOOST_CHECK_EQUAL(alsa1.getExpirationTimePoint(), testTimePoint);
-  BOOST_CHECK_EQUAL(alsa1.getNoLink(), 1);
-  BOOST_CHECK(alsa1.getAdl().isNeighbor(activeAdjacency.getName()));
-
-  // An AdjLsa initialized with INACTIVE adjacencies should not copy the adjacencies
-  AdjacencyList inactiveAdjacencies;
-  Adjacent inactiveAdjacency(adjacencyName);
-  inactiveAdjacency.setStatus(Adjacent::STATUS_INACTIVE);
-  inactiveAdjacencies.insert(inactiveAdjacency);
-
-  AdjLsa alsa2(routerName, seqNo, testTimePoint,
-               inactiveAdjacencies.size(), inactiveAdjacencies);
-  BOOST_CHECK_EQUAL(alsa2.getAdl().size(), 0);
-
-  // Thus, the two LSAs should not have equal content
-  BOOST_CHECK_EQUAL(alsa1.isEqualContent(alsa2), false);
-
-  // Create a duplicate of alsa1 which should have equal content
-  AdjLsa alsa3(routerName, seqNo, testTimePoint,
-               activeAdjacencies.size(), activeAdjacencies);
-  BOOST_CHECK(alsa1.isEqualContent(alsa3));
-
-  auto wire = alsa1.wireEncode();
-  BOOST_TEST(wire == ADJ_LSA1, boost::test_tools::per_element());
-
-  Adjacent activeAdjacency2("/ndn/edu/adjacency");
-  activeAdjacency2.setStatus(Adjacent::STATUS_ACTIVE);
-  alsa1.addAdjacent(activeAdjacency2);
-  wire = alsa1.wireEncode();
-  BOOST_TEST(wire == ADJ_LSA_EXTRA_NEIGHBOR, boost::test_tools::per_element());
-
-  alsa1.setSeqNo(14);
-  wire = alsa1.wireEncode();
-  BOOST_TEST(wire == ADJ_LSA_DIFF_SEQ, boost::test_tools::per_element());
-
-  testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196024993));
-  alsa1.setExpirationTimePoint(testTimePoint);
-  wire = alsa1.wireEncode();
-  BOOST_TEST(wire == ADJ_LSA_DIFF_TS, boost::test_tools::per_element());
-}
-
-const uint8_t COORDINATE_LSA1[] = {
-  0x85, 0x43, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
-  0x82, 0x01, 0x0C, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
-  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x87, 0x08, 0x40, 0x04, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x88, 0x08, 0x40, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88,
-  0x08, 0x40, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-const uint8_t COORDINATE_LSA_DIFF_ANGLE[] = {
-  0x85, 0x39, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
-  0x82, 0x01, 0x0C, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
-  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x87, 0x08, 0x40, 0x04, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x88, 0x08, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-const uint8_t COORDINATE_LSA_DIFF_RADIUS[] = {
-  0x85, 0x39, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
-  0x82, 0x01, 0x0C, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
-  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x87, 0x08, 0x40, 0x02, 0x66, 0x66,
-  0x66, 0x66, 0x66, 0x66, 0x88, 0x08, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-const uint8_t COORDINATE_LSA_DIFF_SEQ[] = {
-  0x85, 0x39, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
-  0x82, 0x01, 0x0E, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
-  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x33, 0x34, 0x87, 0x08, 0x40, 0x02, 0x66, 0x66,
-  0x66, 0x66, 0x66, 0x66, 0x88, 0x08, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-const uint8_t COORDINATE_LSA_DIFF_TS[] = {
-  0x85, 0x39, 0x80, 0x23, 0x07, 0x09, 0x08, 0x07, 0x72, 0x6F, 0x75, 0x74, 0x65, 0x72, 0x31,
-  0x82, 0x01, 0x0E, 0x8B, 0x13, 0x32, 0x30, 0x32, 0x30, 0x2D, 0x30, 0x33, 0x2D, 0x32, 0x36,
-  0x20, 0x30, 0x34, 0x3A, 0x31, 0x33, 0x3A, 0x34, 0x34, 0x87, 0x08, 0x40, 0x02, 0x66, 0x66,
-  0x66, 0x66, 0x66, 0x66, 0x88, 0x08, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-BOOST_AUTO_TEST_CASE(CoordinateLsaBasic)
-{
-  auto testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196014943));
-  std::vector<double> angles1{30.0}, angles2{30.0};
-  angles1.push_back(30.0);
-  angles2.push_back(30.0);
-  CoordinateLsa clsa1("router1", 12, testTimePoint, 2.5, angles1);
-  CoordinateLsa clsa2("router1", 12, testTimePoint, 2.5, angles2);
-
-  BOOST_CHECK_CLOSE(clsa1.getCorRadius(), 2.5, 0.0001);
-  BOOST_CHECK(clsa1.getCorTheta() == angles1);
-
-  BOOST_CHECK(clsa1.isEqualContent(clsa2));
-
-  BOOST_CHECK_EQUAL(clsa1.wireEncode(), clsa2.wireEncode());
-
-  auto wire = clsa1.wireEncode();
-  BOOST_TEST(wire == COORDINATE_LSA1, boost::test_tools::per_element());
-
-  std::vector<double> angles3{40.0};
-  clsa1.setCorTheta(angles3);
-  wire = clsa1.wireEncode();
-  BOOST_TEST(wire == COORDINATE_LSA_DIFF_ANGLE, boost::test_tools::per_element());
-
-  clsa1.setCorRadius(2.3);
-  wire = clsa1.wireEncode();
-  BOOST_TEST(wire == COORDINATE_LSA_DIFF_RADIUS, boost::test_tools::per_element());
-
-  clsa1.setSeqNo(14);
-  wire = clsa1.wireEncode();
-  BOOST_TEST(wire == COORDINATE_LSA_DIFF_SEQ, boost::test_tools::per_element());
-
-  testTimePoint = ndn::time::fromUnixTimestamp(ndn::time::milliseconds(1585196024993));
-  clsa1.setExpirationTimePoint(testTimePoint);
-  wire = clsa1.wireEncode();
-  BOOST_TEST(wire == COORDINATE_LSA_DIFF_TS, boost::test_tools::per_element());
-}
-
-BOOST_AUTO_TEST_CASE(IncrementAdjacentNumber)
-{
-  Adjacent adj1("adjacent1");
-  Adjacent adj2("adjacent2");
-
-  adj1.setStatus(Adjacent::STATUS_ACTIVE);
-  adj2.setStatus(Adjacent::STATUS_ACTIVE);
-
-  AdjacencyList adjList;
-  adjList.insert(adj1);
-  adjList.insert(adj2);
-
-  auto testTimePoint = ndn::time::system_clock::now() + ndn::time::seconds(3600);
-
-  AdjLsa lsa("router1", 12, testTimePoint, adjList.size(), adjList);
-
-  std::ostringstream os;
-  os << lsa;
-
-  std::string EXPECTED_OUTPUT =
-    "    ADJACENCY LSA:\n"
-    "      Origin Router      : /router1\n"
-    "      Sequence Number    : 12\n"
-    "      Expires in         : 3599999 milliseconds\n"
-    "      Adjacent(s):\n"
-    "        Adjacent 0: (name=/adjacent1, uri=://, cost=10)\n"
-    "        Adjacent 1: (name=/adjacent2, uri=://, cost=10)\n";
-
-  BOOST_CHECK_EQUAL(os.str(), EXPECTED_OUTPUT);
-}
-
-BOOST_AUTO_TEST_CASE(TestInitializeFromContent)
-{
-  //Adj LSA
-  Adjacent adj1("adjacent1");
-  Adjacent adj2("adjacent2");
-
-  adj1.setStatus(Adjacent::STATUS_ACTIVE);
-  adj2.setStatus(Adjacent::STATUS_ACTIVE);
-
-  //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.setFaceUri(ndn::FaceUri("udp://10.0.0.1"));
-  adj2.setFaceUri(ndn::FaceUri("udp://10.0.0.2"));
-
-  AdjacencyList adjList;
-  adjList.insert(adj1);
-  adjList.insert(adj2);
-
-  auto testTimePoint = ndn::time::system_clock::now();
-
-  AdjLsa adjlsa1("router1", 1, testTimePoint, adjList.size(), adjList);
-  AdjLsa adjlsa2(adjlsa1.wireEncode());
-  BOOST_CHECK(adjlsa1.isEqualContent(adjlsa2));
-
-  //Name LSA
-  ndn::Name s1{"name1"};
-  ndn::Name s2{"name2"};
-  NamePrefixList npl1{s1, s2};
-
-  NameLsa nlsa1("router1", 1, testTimePoint, npl1);
-  NameLsa nlsa2(nlsa1.wireEncode());
-  BOOST_CHECK_EQUAL(nlsa1.wireEncode(), nlsa2.wireEncode());
-
-  //Coordinate LSA
-  std::vector<double> angles = {30, 40.0};
-  CoordinateLsa clsa1("router1", 12, testTimePoint, 2.5, angles);
-  CoordinateLsa clsa2(clsa1.wireEncode());
-  BOOST_CHECK_EQUAL(clsa1.wireEncode(), clsa2.wireEncode());
-}
-
-BOOST_AUTO_TEST_CASE(OperatorEquals)
-{
-  NameLsa lsa1;
-  NameLsa lsa2;
-  ndn::Name name1("/ndn/test/name1");
-  ndn::Name name2("/ndn/test/name2");
-  ndn::Name name3("/ndn/some/other/name1");
-
-  lsa1.addName(name1);
-  lsa1.addName(name2);
-  lsa1.addName(name3);
-
-  lsa2.addName(name1);
-  lsa2.addName(name2);
-  lsa2.addName(name3);
-
-  BOOST_CHECK(lsa1.isEqualContent(lsa2));
-}
-
-BOOST_AUTO_TEST_CASE(NameLsaUpdate)
-{
-  NameLsa knownNameLsa;
-  knownNameLsa.m_originRouter = ndn::Name("/yoursunny/_/%C1.Router/dal");
-  knownNameLsa.m_seqNo = 2683;
-  knownNameLsa.setExpirationTimePoint(ndn::time::system_clock::now() + 3561_ms);
-  knownNameLsa.addName("/yoursunny/_/dal");
-  knownNameLsa.addName("/ndn");
-
-  auto rcvdLsa = std::make_shared<NameLsa>();
-  rcvdLsa->m_originRouter = ndn::Name("/yoursunny/_/%C1.Router/dal");
-  rcvdLsa->m_seqNo = 2684;
-  rcvdLsa->setExpirationTimePoint(ndn::time::system_clock::now() + 3600_ms);
-
-  auto nlsa = std::static_pointer_cast<NameLsa>(rcvdLsa);
-  nlsa->addName("/ndn");
-  nlsa->addName("/yoursunny/_/dal");
-  ndn::Name addedName1("/yoursunny/video/ndn-dpdk_acmicn20_20200917");
-  ndn::Name addedName2("/yoursunny/pushups");
-  nlsa->addName(addedName1);
-  nlsa->addName(addedName2);
-
-  auto [updated, namesToAdd, namesToRemove] = knownNameLsa.update(rcvdLsa);
-
-  BOOST_CHECK_EQUAL(updated, true);
-  BOOST_CHECK_EQUAL(namesToAdd.size(), 2);
-  BOOST_CHECK_EQUAL(namesToRemove.size(), 0);
-  auto it = std::find(namesToAdd.begin(), namesToAdd.end(), addedName1);
-  BOOST_CHECK(it != namesToAdd.end());
-  it = std::find(namesToAdd.begin(), namesToAdd.end(), addedName2);
-  BOOST_CHECK(it != namesToAdd.end());
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-} // namespace test
-} // namespace nlsr
