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
