diff --git a/tests/tlv/test-adjacency-lsa.cpp b/tests/tlv/test-adjacency-lsa.cpp
new file mode 100644
index 0000000..16a7d1e
--- /dev/null
+++ b/tests/tlv/test-adjacency-lsa.cpp
@@ -0,0 +1,223 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  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 "tlv/adjacency-lsa.hpp"
+
+#include "../boost-test.hpp"
+
+namespace nlsr {
+namespace tlv  {
+namespace test {
+
+BOOST_AUTO_TEST_SUITE(TlvTestAdjacencyLsa)
+
+const uint8_t AdjacencyLsaWithAdjacenciesData[] =
+{
+  // Header
+  0x83, 0x3d,
+  // LsaInfo
+  0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+  0x80, 0x8b, 0x02, 0x27, 0x10,
+  // Adjacency
+  0x84, 0x13, 0x07, 0x07, 0x08, 0x05, 0x74, 0x65, 0x73, 0x74, 0x31, 0x8d, 0x05, 0x74,
+  0x65, 0x73, 0x74, 0x31, 0x8c, 0x01, 0x80,
+  // Adjacency
+  0x84, 0x13, 0x07, 0x07, 0x08, 0x05, 0x74, 0x65, 0x73, 0x74, 0x32, 0x8d, 0x05, 0x74,
+  0x65, 0x73, 0x74, 0x32, 0x8c, 0x01, 0x80
+};
+
+const uint8_t AdjacencyLsaWithoutAdjacenciesData[] =
+{
+  // Header
+  0x83, 0x13,
+  // LsaInfo
+  0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+  0x80, 0x8b, 0x02, 0x27, 0x10,
+};
+
+BOOST_AUTO_TEST_CASE(AdjacencyLsaEncodeWithAdjacencies)
+{
+  AdjacencyLsa adjacencyLsa;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+  adjacencyLsa.setLsaInfo(lsaInfo);
+
+  Adjacency adjacency1;
+  adjacency1.setName("test1");
+  adjacency1.setUri("test1");
+  adjacency1.setCost(128);
+  adjacencyLsa.addAdjacency(adjacency1);
+
+  Adjacency adjacency2;
+  adjacency2.setName("test2");
+  adjacency2.setUri("test2");
+  adjacency2.setCost(128);
+  adjacencyLsa.addAdjacency(adjacency2);
+
+  const ndn::Block& wire = adjacencyLsa.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(AdjacencyLsaWithAdjacenciesData,
+                                  AdjacencyLsaWithAdjacenciesData +
+                                    sizeof(AdjacencyLsaWithAdjacenciesData),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(AdjacencyLsaDecodeWithAdjacencies)
+{
+  AdjacencyLsa adjacencyLsa;
+
+  adjacencyLsa.wireDecode(ndn::Block(AdjacencyLsaWithAdjacenciesData,
+                                      sizeof(AdjacencyLsaWithAdjacenciesData)));
+
+  LsaInfo lsaInfo = adjacencyLsa.getLsaInfo();
+  BOOST_CHECK_EQUAL(lsaInfo.getOriginRouter(), "test");
+  BOOST_CHECK_EQUAL(lsaInfo.getSequenceNumber(), 128);
+  BOOST_CHECK_EQUAL(lsaInfo.getExpirationPeriod(), ndn::time::milliseconds(10000));
+
+  BOOST_CHECK_EQUAL(adjacencyLsa.hasAdjacencies(), true);
+  std::list<Adjacency> adjacencies = adjacencyLsa.getAdjacencies();
+  std::list<Adjacency>::const_iterator it = adjacencies.begin();
+  BOOST_CHECK_EQUAL(it->getName(), "test1");
+  BOOST_CHECK_EQUAL(it->getUri(), "test1");
+  BOOST_CHECK_EQUAL(it->getCost(), 128);
+
+  it++;
+  BOOST_CHECK_EQUAL(it->getName(), "test2");
+  BOOST_CHECK_EQUAL(it->getUri(), "test2");
+  BOOST_CHECK_EQUAL(it->getCost(), 128);
+}
+
+BOOST_AUTO_TEST_CASE(AdjacencyLsaEncodeWithoutAdjacencies)
+{
+  AdjacencyLsa adjacencyLsa;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+  adjacencyLsa.setLsaInfo(lsaInfo);
+
+  const ndn::Block& wire = adjacencyLsa.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(AdjacencyLsaWithoutAdjacenciesData,
+                                  AdjacencyLsaWithoutAdjacenciesData +
+                                    sizeof(AdjacencyLsaWithoutAdjacenciesData),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(AdjacencyLsaDecodeWithoutAdjacencies)
+{
+  AdjacencyLsa adjacencyLsa;
+
+  adjacencyLsa.wireDecode(ndn::Block(AdjacencyLsaWithoutAdjacenciesData,
+                                      sizeof(AdjacencyLsaWithoutAdjacenciesData)));
+
+  LsaInfo lsaInfo = adjacencyLsa.getLsaInfo();
+  BOOST_CHECK_EQUAL(lsaInfo.getOriginRouter(), "test");
+  BOOST_CHECK_EQUAL(lsaInfo.getSequenceNumber(), 128);
+  BOOST_CHECK_EQUAL(lsaInfo.getExpirationPeriod(), ndn::time::milliseconds(10000));
+
+  BOOST_CHECK_EQUAL(adjacencyLsa.hasAdjacencies(), false);
+}
+
+
+BOOST_AUTO_TEST_CASE(AdjacencyLsaClear)
+{
+  AdjacencyLsa adjacencyLsa;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+  adjacencyLsa.setLsaInfo(lsaInfo);
+
+  Adjacency adjacency1;
+  adjacency1.setName("test1");
+  adjacency1.setUri("test1");
+  adjacency1.setCost(128);
+  adjacencyLsa.addAdjacency(adjacency1);
+  BOOST_CHECK_EQUAL(adjacencyLsa.getAdjacencies().size(), 1);
+
+  std::list<Adjacency> adjacencies = adjacencyLsa.getAdjacencies();
+  std::list<Adjacency>::const_iterator it = adjacencies.begin();
+  BOOST_CHECK_EQUAL(it->getName(), "test1");
+  BOOST_CHECK_EQUAL(it->getUri(), "test1");
+  BOOST_CHECK_EQUAL(it->getCost(), 128);
+
+  adjacencyLsa.clearAdjacencies();
+  BOOST_CHECK_EQUAL(adjacencyLsa.getAdjacencies().size(), 0);
+
+  Adjacency adjacency2;
+  adjacency2.setName("test2");
+  adjacency2.setUri("test2");
+  adjacency2.setCost(128);
+  adjacencyLsa.addAdjacency(adjacency2);
+  BOOST_CHECK_EQUAL(adjacencyLsa.getAdjacencies().size(), 1);
+
+  adjacencies = adjacencyLsa.getAdjacencies();
+  it = adjacencies.begin();
+  BOOST_CHECK_EQUAL(it->getName(), "test2");
+  BOOST_CHECK_EQUAL(it->getUri(), "test2");
+  BOOST_CHECK_EQUAL(it->getCost(), 128);
+}
+
+BOOST_AUTO_TEST_CASE(AdjacencyLsaOutputStream)
+{
+  AdjacencyLsa adjacencyLsa;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+  adjacencyLsa.setLsaInfo(lsaInfo);
+
+  Adjacency adjacency1;
+  adjacency1.setName("test1");
+  adjacency1.setUri("test1");
+  adjacency1.setCost(128);
+  adjacencyLsa.addAdjacency(adjacency1);
+
+  Adjacency adjacency2;
+  adjacency2.setName("test2");
+  adjacency2.setUri("test2");
+  adjacency2.setCost(128);
+  adjacencyLsa.addAdjacency(adjacency2);
+
+  std::ostringstream os;
+  os << adjacencyLsa;
+
+  BOOST_CHECK_EQUAL(os.str(), "AdjacencyLsa("
+                                "LsaInfo("
+                                  "OriginRouter: /test, "
+                                  "SequenceNumber: 128, "
+                                  "ExpirationPeriod: 10000 milliseconds), "
+                                "Adjacency(Name: /test1, Uri: test1, Cost: 128), "
+                                "Adjacency(Name: /test2, Uri: test2, Cost: 128))");
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace test
+} // namespace tlv
+} // namespace nlsr
diff --git a/tests/tlv/test-adjacency.cpp b/tests/tlv/test-adjacency.cpp
new file mode 100644
index 0000000..7c3ff53
--- /dev/null
+++ b/tests/tlv/test-adjacency.cpp
@@ -0,0 +1,91 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  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 "tlv/adjacency.hpp"
+
+#include "../boost-test.hpp"
+
+namespace nlsr {
+namespace tlv  {
+namespace test {
+
+BOOST_AUTO_TEST_SUITE(TlvTestAdjacency)
+
+const uint8_t AdjacencyData[] =
+{
+  // Header
+  0x84, 0x30,
+  // Name
+  0x07, 0x16, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x08, 0x09, 0x61, 0x64, 0x6a, 0x61,
+  0x63, 0x65, 0x6e, 0x63, 0x79, 0x08, 0x03, 0x74, 0x6c, 0x76,
+  // Uri
+  0x8d, 0x13, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65,
+  0x6e, 0x63, 0x79, 0x2f, 0x74, 0x6c, 0x76,
+  // Cost
+  0x8c, 0x01, 0x80
+};
+
+BOOST_AUTO_TEST_CASE(AdjacencyEncode)
+{
+  Adjacency adjacency;
+  adjacency.setName("/test/adjacency/tlv");
+  adjacency.setUri("/test/adjacency/tlv");
+  adjacency.setCost(128);
+
+  const ndn::Block& wire = adjacency.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(AdjacencyData,
+                                  AdjacencyData + sizeof(AdjacencyData),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(AdjacencyDecode)
+{
+  Adjacency adjacency;
+
+  adjacency.wireDecode(ndn::Block(AdjacencyData, sizeof(AdjacencyData)));
+
+  ndn::Name name("/test/adjacency/tlv");
+  BOOST_REQUIRE_EQUAL(adjacency.getName(), name);
+  BOOST_REQUIRE_EQUAL(adjacency.getUri(), "/test/adjacency/tlv");
+  BOOST_REQUIRE_EQUAL(adjacency.getCost(), 128);
+}
+
+BOOST_AUTO_TEST_CASE(AdjacencyOutputStream)
+{
+  Adjacency adjacency;
+  adjacency.setName("/test/adjacency/tlv");
+  adjacency.setUri("/test/adjacency/tlv");
+  adjacency.setCost(128);
+
+  std::ostringstream os;
+  os << adjacency;
+
+  BOOST_CHECK_EQUAL(os.str(), "Adjacency(Name: /test/adjacency/tlv, "
+                              "Uri: /test/adjacency/tlv, "
+                              "Cost: 128)");
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace test
+} // namespace tlv
+} // namespace nlsr
diff --git a/tests/tlv/test-coordinate-lsa.cpp b/tests/tlv/test-coordinate-lsa.cpp
new file mode 100644
index 0000000..cb05ed4
--- /dev/null
+++ b/tests/tlv/test-coordinate-lsa.cpp
@@ -0,0 +1,107 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  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 "tlv/coordinate-lsa.hpp"
+
+#include "../boost-test.hpp"
+
+namespace nlsr {
+namespace tlv  {
+namespace test {
+
+BOOST_AUTO_TEST_SUITE(TlvTestCoordinateLsa)
+
+const uint8_t CoordinateLsaData[] =
+{
+  // Header
+  0x85, 0x2b,
+  // LsaInfo
+  0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+  0x80, 0x8b, 0x02, 0x27, 0x10,
+  // HyperbolicRadius
+  0x87, 0x0a, 0x86, 0x08, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xfa, 0x3f,
+  // HyperbolicAngle
+  0x88, 0x0a, 0x86, 0x08, 0x7b, 0x14, 0xae, 0x47, 0xe1, 0x7a, 0xfc, 0x3f
+};
+
+BOOST_AUTO_TEST_CASE(CoordinateLsaEncode)
+{
+  CoordinateLsa coordinateLsa;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+  coordinateLsa.setLsaInfo(lsaInfo);
+
+  coordinateLsa.setHyperbolicRadius(1.65);
+  coordinateLsa.setHyperbolicAngle(1.78);
+
+  const ndn::Block& wire = coordinateLsa.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(CoordinateLsaData,
+                                  CoordinateLsaData + sizeof(CoordinateLsaData),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(CoordinateLsaDecode)
+{
+  CoordinateLsa coordinateLsa;
+
+  coordinateLsa.wireDecode(ndn::Block(CoordinateLsaData, sizeof(CoordinateLsaData)));
+
+  BOOST_REQUIRE_EQUAL(coordinateLsa.getLsaInfo().getOriginRouter(), "test");
+  BOOST_REQUIRE_EQUAL(coordinateLsa.getLsaInfo().getSequenceNumber(), 128);
+  BOOST_REQUIRE_EQUAL(coordinateLsa.getLsaInfo().getExpirationPeriod(),
+                      ndn::time::milliseconds(10000));
+  BOOST_REQUIRE_EQUAL(coordinateLsa.getHyperbolicRadius(), 1.65);
+  BOOST_REQUIRE_EQUAL(coordinateLsa.getHyperbolicAngle(), 1.78);
+}
+
+BOOST_AUTO_TEST_CASE(CoordinateLsaOutputStream)
+{
+  CoordinateLsa coordinateLsa;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+  coordinateLsa.setLsaInfo(lsaInfo);
+
+  coordinateLsa.setHyperbolicRadius(1.65);
+  coordinateLsa.setHyperbolicAngle(1.78);
+
+  std::ostringstream os;
+  os << coordinateLsa;
+
+  BOOST_CHECK_EQUAL(os.str(), "CoordinateLsa("
+                                "LsaInfo(OriginRouter: /test, "
+                                        "SequenceNumber: 128, "
+                                        "ExpirationPeriod: 10000 milliseconds), "
+                                "HyperbolicRadius: 1.65, "
+                                "HyperbolicAngle: 1.78)");
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace test
+} // namespace tlv
+} // namespace nlsr
diff --git a/tests/tlv/test-lsa-info.cpp b/tests/tlv/test-lsa-info.cpp
new file mode 100644
index 0000000..dff4458
--- /dev/null
+++ b/tests/tlv/test-lsa-info.cpp
@@ -0,0 +1,130 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  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 "tlv/lsa-info.hpp"
+
+#include "../boost-test.hpp"
+
+namespace nlsr {
+namespace tlv  {
+namespace test {
+
+BOOST_AUTO_TEST_SUITE(TlvTestLsaInfo)
+
+const uint8_t LsaInfoData[] =
+{
+  // Header
+  0x80, 0x21,
+  // OriginRouter
+  0x81, 0x18, 0x07, 0x16, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x08, 0x03, 0x6c, 0x73,
+  0x61, 0x08, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x08, 0x03, 0x74, 0x6c, 0x76,
+  // SequenceNumber
+  0x82, 0x01, 0x80,
+  // ExpirationPeriod
+  0x8b, 0x02, 0x27, 0x10
+};
+
+const uint8_t LsaInfoDataInfiniteExpirationPeriod[] =
+{
+  // Header
+  0x80, 0x1d,
+  // OriginRouter
+  0x81, 0x18, 0x07, 0x16, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x08, 0x03, 0x6c, 0x73,
+  0x61, 0x08, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x08, 0x03, 0x74, 0x6c, 0x76,
+  // SequenceNumber
+  0x82, 0x1, 0x80
+};
+
+BOOST_AUTO_TEST_CASE(LsaInfoEncode)
+{
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("/test/lsa/info/tlv");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+
+  const ndn::Block& wire = lsaInfo.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(LsaInfoData,
+                                  LsaInfoData + sizeof(LsaInfoData),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(LsaInfoDecode)
+{
+  LsaInfo lsaInfo;
+
+  lsaInfo.wireDecode(ndn::Block(LsaInfoData, sizeof(LsaInfoData)));
+
+  ndn::Name originRouter("/test/lsa/info/tlv");
+  BOOST_REQUIRE_EQUAL(lsaInfo.getOriginRouter(), originRouter);
+  BOOST_REQUIRE_EQUAL(lsaInfo.getSequenceNumber(), 128);
+  BOOST_REQUIRE_EQUAL(lsaInfo.getExpirationPeriod(), ndn::time::milliseconds(10000));
+  BOOST_REQUIRE_EQUAL(lsaInfo.hasInfiniteExpirationPeriod(), false);
+}
+
+BOOST_AUTO_TEST_CASE(LsaInfoInfiniteExpirationPeriodEncode)
+{
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("/test/lsa/info/tlv");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(LsaInfo::INFINITE_EXPIRATION_PERIOD);
+
+  const ndn::Block& wire = lsaInfo.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(LsaInfoDataInfiniteExpirationPeriod,
+                                  LsaInfoDataInfiniteExpirationPeriod +
+                                    sizeof(LsaInfoDataInfiniteExpirationPeriod),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(LsaInfoInfiniteExpirationPeriodDecode)
+{
+  LsaInfo lsaInfo;
+
+  lsaInfo.wireDecode(ndn::Block(LsaInfoDataInfiniteExpirationPeriod,
+                                sizeof(LsaInfoDataInfiniteExpirationPeriod)));
+
+  ndn::Name originRouter("/test/lsa/info/tlv");
+  BOOST_REQUIRE_EQUAL(lsaInfo.getOriginRouter(), originRouter);
+  BOOST_REQUIRE_EQUAL(lsaInfo.getSequenceNumber(), 128);
+  BOOST_REQUIRE_EQUAL(lsaInfo.getExpirationPeriod(), LsaInfo::INFINITE_EXPIRATION_PERIOD);
+  BOOST_REQUIRE_EQUAL(lsaInfo.hasInfiniteExpirationPeriod(), true);
+}
+
+BOOST_AUTO_TEST_CASE(LsaInfoOutputStream)
+{
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("/test/lsa/info/tlv");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+
+  std::ostringstream os;
+  os << lsaInfo;
+
+  BOOST_CHECK_EQUAL(os.str(), "LsaInfo(OriginRouter: /test/lsa/info/tlv, SequenceNumber: 128, "
+                              "ExpirationPeriod: 10000 milliseconds)");
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace test
+} // namespace tlv
+} // namespace nlsr
diff --git a/tests/tlv/test-lsdb-status.cpp b/tests/tlv/test-lsdb-status.cpp
new file mode 100644
index 0000000..73a120f
--- /dev/null
+++ b/tests/tlv/test-lsdb-status.cpp
@@ -0,0 +1,337 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  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 "tlv/lsdb-status.hpp"
+
+#include "../boost-test.hpp"
+
+namespace nlsr {
+namespace tlv  {
+namespace test {
+
+BOOST_AUTO_TEST_SUITE(TlvTestLsdbStatus)
+
+const uint8_t LsdbStatusData1[] =
+{
+  // Header
+  0x8a, 0x7f,
+  // AdjacencyLsa
+  0x83, 0x32,
+    // LsaInfo
+    0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+    0x80, 0x8b, 0x02, 0x27, 0x10,
+    // Adjacency
+    0x84, 0x1d, 0x07, 0x0c, 0x08, 0x0a, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x63,
+    0x79, 0x31, 0x8d, 0x0a, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x63, 0x79, 0x31,
+    0x8c, 0x01, 0x80,
+  // CoordianteLsa
+  0x85, 0x2b,
+    // LsaInfo
+    0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+    0x80, 0x8b, 0x02, 0x27, 0x10,
+    // HyperbolicRadius
+    0x87, 0x0a, 0x86, 0x08, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xfa, 0x3f,
+    // HyperbolicAngle
+    0x88, 0x0a, 0x86, 0x08, 0x7b, 0x14, 0xae, 0x47, 0xe1, 0x7a, 0xfc, 0x3f,
+  // NameLsa
+  0x89, 0x1c,
+    // LsaInfo
+    0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+    0x80, 0x8b, 0x02, 0x27, 0x10,
+    // Name
+    0x07, 0x07, 0x08, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x31
+};
+
+const uint8_t LsdbStatusData2[] =
+{
+  // Header
+  0x8a, 0x00
+};
+
+const uint8_t LsdbStatusData3[] =
+{
+  // Header
+  0x8a, 0x7f,
+  // CoordianteLsa
+  0x85, 0x2b,
+    // LsaInfo
+    0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+    0x80, 0x8b, 0x02, 0x27, 0x10,
+    // HyperbolicRadius
+    0x87, 0x0a, 0x86, 0x08, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xfa, 0x3f,
+    // HyperbolicAngle
+    0x88, 0x0a, 0x86, 0x08, 0x7b, 0x14, 0xae, 0x47, 0xe1, 0x7a, 0xfc, 0x3f,
+  // NameLsa
+  0x89, 0x1c,
+    // LsaInfo
+    0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+    0x80, 0x8b, 0x02, 0x27, 0x10,
+    // Name
+    0x07, 0x07, 0x08, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x31,
+  // AdjacencyLsa
+   0x83, 0x32,
+     // LsaInfo
+     0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+     0x80, 0x8b, 0x02, 0x27, 0x10,
+     // Adjacency
+     0x84, 0x1d, 0x07, 0x0c, 0x08, 0x0a, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x63,
+     0x79, 0x31, 0x8d, 0x0a, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x63, 0x79, 0x31,
+     0x8c, 0x01, 0x80
+};
+
+BOOST_AUTO_TEST_CASE(LsdbStatusEncode1)
+{
+  LsdbStatus lsdbStatus;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+
+  // AdjacencyLsa
+  AdjacencyLsa adjacencyLsa;
+  adjacencyLsa.setLsaInfo(lsaInfo);
+
+  Adjacency adjacency1;
+  adjacency1.setName("adjacency1");
+  adjacency1.setUri("adjacency1");
+  adjacency1.setCost(128);
+  adjacencyLsa.addAdjacency(adjacency1);
+
+  lsdbStatus.addAdjacencyLsa(adjacencyLsa);
+
+  // CoordinateLsa
+  CoordinateLsa coordinateLsa;
+  coordinateLsa.setLsaInfo(lsaInfo);
+
+  coordinateLsa.setHyperbolicRadius(1.65);
+  coordinateLsa.setHyperbolicAngle(1.78);
+
+  lsdbStatus.addCoordinateLsa(coordinateLsa);
+
+  // NameLsa
+  NameLsa nameLsa;
+  nameLsa.setLsaInfo(lsaInfo);
+  nameLsa.addName("name1");
+
+  lsdbStatus.addNameLsa(nameLsa);
+
+  const ndn::Block& wire = lsdbStatus.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(LsdbStatusData1,
+                                  LsdbStatusData1 + sizeof(LsdbStatusData1),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(LsdbStatusEncode2)
+{
+  LsdbStatus lsdbStatus;
+
+  const ndn::Block& wire = lsdbStatus.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(LsdbStatusData2,
+                                  LsdbStatusData2 + sizeof(LsdbStatusData2),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(LsdbStatusDecode1)
+{
+  LsdbStatus lsdbStatus;
+
+  lsdbStatus.wireDecode(ndn::Block(LsdbStatusData1, sizeof(LsdbStatusData1)));
+
+  std::list<AdjacencyLsa> adjacencyLsas = lsdbStatus.getAdjacencyLsas();
+  std::list<AdjacencyLsa>::const_iterator it1 = adjacencyLsas.begin();
+
+  LsaInfo lsaInfo = it1->getLsaInfo();
+  BOOST_CHECK_EQUAL(lsaInfo.getOriginRouter(), "test");
+  BOOST_CHECK_EQUAL(lsaInfo.getSequenceNumber(), 128);
+  BOOST_CHECK_EQUAL(lsaInfo.getExpirationPeriod(), ndn::time::milliseconds(10000));
+
+  std::list<Adjacency> adjacencies = it1->getAdjacencies();
+  std::list<Adjacency>::const_iterator it2 = adjacencies.begin();
+  BOOST_CHECK_EQUAL(it2->getName(), "adjacency1");
+  BOOST_CHECK_EQUAL(it2->getUri(), "adjacency1");
+  BOOST_CHECK_EQUAL(it2->getCost(), 128);
+
+  BOOST_CHECK_EQUAL(lsdbStatus.hasAdjacencyLsas(), true);
+
+  std::list<CoordinateLsa> coordinateLsas = lsdbStatus.getCoordinateLsas();
+  std::list<CoordinateLsa>::const_iterator it3 = coordinateLsas.begin();
+
+  lsaInfo = it3->getLsaInfo();
+  BOOST_CHECK_EQUAL(lsaInfo.getOriginRouter(), "test");
+  BOOST_CHECK_EQUAL(lsaInfo.getSequenceNumber(), 128);
+  BOOST_CHECK_EQUAL(lsaInfo.getExpirationPeriod(), ndn::time::milliseconds(10000));
+
+  BOOST_REQUIRE_EQUAL(it3->getHyperbolicRadius(), 1.65);
+  BOOST_REQUIRE_EQUAL(it3->getHyperbolicAngle(), 1.78);
+
+  BOOST_CHECK_EQUAL(lsdbStatus.hasCoordinateLsas(), true);
+
+  std::list<NameLsa> nameLsas = lsdbStatus.getNameLsas();
+  std::list<NameLsa>::const_iterator it4 = nameLsas.begin();
+
+  lsaInfo = it4->getLsaInfo();
+  BOOST_CHECK_EQUAL(lsaInfo.getOriginRouter(), "test");
+  BOOST_CHECK_EQUAL(lsaInfo.getSequenceNumber(), 128);
+  BOOST_CHECK_EQUAL(lsaInfo.getExpirationPeriod(), ndn::time::milliseconds(10000));
+
+  std::list<ndn::Name> names = it4->getNames();
+  std::list<ndn::Name>::const_iterator it5 = names.begin();
+  BOOST_CHECK_EQUAL(*it5, "name1");
+
+  BOOST_CHECK_EQUAL(lsdbStatus.hasNameLsas(), true);
+}
+
+BOOST_AUTO_TEST_CASE(LsdbStatusDecode2)
+{
+  LsdbStatus lsdbStatus;
+
+  lsdbStatus.wireDecode(ndn::Block(LsdbStatusData2, sizeof(LsdbStatusData2)));
+
+  BOOST_CHECK_EQUAL(lsdbStatus.hasAdjacencyLsas(), false);
+  BOOST_CHECK_EQUAL(lsdbStatus.hasCoordinateLsas(), false);
+  BOOST_CHECK_EQUAL(lsdbStatus.hasNameLsas(), false);
+}
+
+BOOST_AUTO_TEST_CASE(LsdbStatusDecode3)
+{
+  LsdbStatus lsdbStatus;
+
+  BOOST_CHECK_THROW(lsdbStatus.wireDecode(ndn::Block(LsdbStatusData3, sizeof(LsdbStatusData3))),
+                    LsdbStatus::Error);
+}
+
+BOOST_AUTO_TEST_CASE(LsdbStatusClear)
+{
+  LsdbStatus lsdbStatus;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+
+  // AdjacencyLsa
+  AdjacencyLsa adjacencyLsa;
+  adjacencyLsa.setLsaInfo(lsaInfo);
+
+  Adjacency adjacency1;
+  adjacency1.setName("adjacency1");
+  adjacency1.setUri("adjacency1");
+  adjacency1.setCost(128);
+  adjacencyLsa.addAdjacency(adjacency1);
+
+  lsdbStatus.addAdjacencyLsa(adjacencyLsa);
+  BOOST_CHECK_EQUAL(lsdbStatus.hasAdjacencyLsas(), true);
+  lsdbStatus.clearAdjacencyLsas();
+  BOOST_CHECK_EQUAL(lsdbStatus.hasAdjacencyLsas(), false);
+
+  // CoordinateLsa
+  CoordinateLsa coordinateLsa;
+  coordinateLsa.setLsaInfo(lsaInfo);
+
+  coordinateLsa.setHyperbolicRadius(1.65);
+  coordinateLsa.setHyperbolicAngle(1.78);
+
+  lsdbStatus.addCoordinateLsa(coordinateLsa);
+  BOOST_CHECK_EQUAL(lsdbStatus.hasCoordinateLsas(), true);
+  lsdbStatus.clearCoordinateLsas();
+  BOOST_CHECK_EQUAL(lsdbStatus.hasCoordinateLsas(), false);
+
+  // NameLsa
+  NameLsa nameLsa;
+  nameLsa.setLsaInfo(lsaInfo);
+  nameLsa.addName("name1");
+
+  lsdbStatus.addNameLsa(nameLsa);
+  BOOST_CHECK_EQUAL(lsdbStatus.hasNameLsas(), true);
+  lsdbStatus.clearNameLsas();
+  BOOST_CHECK_EQUAL(lsdbStatus.hasNameLsas(), false);
+}
+
+BOOST_AUTO_TEST_CASE(LsdbStatusOutputStream)
+{
+  LsdbStatus lsdbStatus;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+
+  // AdjacencyLsa
+  AdjacencyLsa adjacencyLsa;
+  adjacencyLsa.setLsaInfo(lsaInfo);
+
+  Adjacency adjacency1;
+  adjacency1.setName("adjacency1");
+  adjacency1.setUri("adjacency1");
+  adjacency1.setCost(128);
+  adjacencyLsa.addAdjacency(adjacency1);
+
+  lsdbStatus.addAdjacencyLsa(adjacencyLsa);
+
+  // CoordinateLsa
+  CoordinateLsa coordinateLsa;
+  coordinateLsa.setLsaInfo(lsaInfo);
+
+  coordinateLsa.setHyperbolicRadius(1.65);
+  coordinateLsa.setHyperbolicAngle(1.78);
+
+  lsdbStatus.addCoordinateLsa(coordinateLsa);
+
+  // NameLsa
+  NameLsa nameLsa;
+  nameLsa.setLsaInfo(lsaInfo);
+  nameLsa.addName("name1");
+
+  lsdbStatus.addNameLsa(nameLsa);
+
+  std::ostringstream os;
+  os << lsdbStatus;
+
+  BOOST_CHECK_EQUAL(os.str(), "LsdbStatus("
+                                "AdjacencyLsa("
+                                  "LsaInfo("
+                                    "OriginRouter: /test, "
+                                    "SequenceNumber: 128, "
+                                    "ExpirationPeriod: 10000 milliseconds), "
+                                  "Adjacency(Name: /adjacency1, Uri: adjacency1, Cost: 128)), "
+                                "CoordinateLsa("
+                                  "LsaInfo("
+                                    "OriginRouter: /test, "
+                                    "SequenceNumber: 128, "
+                                    "ExpirationPeriod: 10000 milliseconds), "
+                                  "HyperbolicRadius: 1.65, "
+                                  "HyperbolicAngle: 1.78), "
+                                "NameLsa("
+                                  "LsaInfo("
+                                    "OriginRouter: /test, "
+                                    "SequenceNumber: 128, "
+                                    "ExpirationPeriod: 10000 milliseconds), "
+                                  "Name: /name1))");
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace test
+} // namespace tlv
+} // namespace nlsr
diff --git a/tests/tlv/test-name-lsa.cpp b/tests/tlv/test-name-lsa.cpp
new file mode 100644
index 0000000..318d282
--- /dev/null
+++ b/tests/tlv/test-name-lsa.cpp
@@ -0,0 +1,182 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  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 "tlv/name-lsa.hpp"
+
+#include "../boost-test.hpp"
+
+namespace nlsr {
+namespace tlv  {
+namespace test {
+
+BOOST_AUTO_TEST_SUITE(TlvTestNameLsa)
+
+const uint8_t NameLsaWithNamesData[] =
+{
+  // Header
+  0x89, 0x25,
+  // LsaInfo
+  0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+  0x80, 0x8b, 0x02, 0x27, 0x10,
+  // Name
+  0x07, 0x07, 0x08, 0x05, 0x74, 0x65, 0x73, 0x74, 0x31,
+  // Name
+  0x07, 0x07, 0x08, 0x05, 0x74, 0x65, 0x73, 0x74, 0x32
+};
+
+const uint8_t NameLsaWithoutNamesData[] =
+{
+  // Header
+  0x89, 0x13,
+  // LsaInfo
+  0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+  0x80, 0x8b, 0x02, 0x27, 0x10,
+};
+
+BOOST_AUTO_TEST_CASE(NameLsaEncodeWithNames)
+{
+  NameLsa nameLsa;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+  nameLsa.setLsaInfo(lsaInfo);
+
+  nameLsa.addName("test1");
+  nameLsa.addName("test2");
+
+  const ndn::Block& wire = nameLsa.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(NameLsaWithNamesData,
+                                  NameLsaWithNamesData + sizeof(NameLsaWithNamesData),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(NameLsaDecodeWithNames)
+{
+  NameLsa nameLsa;
+
+  nameLsa.wireDecode(ndn::Block(NameLsaWithNamesData, sizeof(NameLsaWithNamesData)));
+
+  LsaInfo lsaInfo = nameLsa.getLsaInfo();
+  BOOST_CHECK_EQUAL(lsaInfo.getOriginRouter(), "test");
+  BOOST_CHECK_EQUAL(lsaInfo.getSequenceNumber(), 128);
+  BOOST_CHECK_EQUAL(lsaInfo.getExpirationPeriod(), ndn::time::milliseconds(10000));
+
+  BOOST_CHECK_EQUAL(nameLsa.hasNames(), true);
+  std::list<ndn::Name> names = nameLsa.getNames();
+  std::list<ndn::Name>::const_iterator it = names.begin();
+  BOOST_CHECK_EQUAL(*it, "test1");
+
+  it++;
+  BOOST_CHECK_EQUAL(*it, "test2");
+}
+
+BOOST_AUTO_TEST_CASE(NameLsaEncodeWithoutNames)
+{
+  NameLsa nameLsa;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+  nameLsa.setLsaInfo(lsaInfo);
+
+  const ndn::Block& wire = nameLsa.wireEncode();
+
+  BOOST_REQUIRE_EQUAL_COLLECTIONS(NameLsaWithoutNamesData,
+                                  NameLsaWithoutNamesData + sizeof(NameLsaWithoutNamesData),
+                                  wire.begin(), wire.end());
+}
+
+BOOST_AUTO_TEST_CASE(NameLsaDecodeWithoutNames)
+{
+  NameLsa nameLsa;
+
+  nameLsa.wireDecode(ndn::Block(NameLsaWithoutNamesData, sizeof(NameLsaWithoutNamesData)));
+
+  LsaInfo lsaInfo = nameLsa.getLsaInfo();
+  BOOST_CHECK_EQUAL(lsaInfo.getOriginRouter(), "test");
+  BOOST_CHECK_EQUAL(lsaInfo.getSequenceNumber(), 128);
+  BOOST_CHECK_EQUAL(lsaInfo.getExpirationPeriod(), ndn::time::milliseconds(10000));
+
+  BOOST_CHECK_EQUAL(nameLsa.hasNames(), false);
+}
+
+BOOST_AUTO_TEST_CASE(NameLsaClear)
+{
+  NameLsa nameLsa;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+  nameLsa.setLsaInfo(lsaInfo);
+
+  nameLsa.addName("test1");
+  BOOST_CHECK_EQUAL(nameLsa.getNames().size(), 1);
+
+  std::list<ndn::Name> names = nameLsa.getNames();
+  std::list<ndn::Name>::const_iterator it = names.begin();
+  BOOST_CHECK_EQUAL(*it, "test1");
+
+  nameLsa.clearNames();
+  BOOST_CHECK_EQUAL(nameLsa.getNames().size(), 0);
+
+  nameLsa.addName("test2");
+  BOOST_CHECK_EQUAL(nameLsa.getNames().size(), 1);
+
+  names = nameLsa.getNames();
+  it = names.begin();
+  BOOST_CHECK_EQUAL(*it, "test2");
+}
+
+BOOST_AUTO_TEST_CASE(AdjacencyLsaOutputStream)
+{
+  NameLsa nameLsa;
+
+  LsaInfo lsaInfo;
+  lsaInfo.setOriginRouter("test");
+  lsaInfo.setSequenceNumber(128);
+  lsaInfo.setExpirationPeriod(ndn::time::milliseconds(10000));
+  nameLsa.setLsaInfo(lsaInfo);
+
+  nameLsa.addName("test1");
+  nameLsa.addName("test2");
+
+  std::ostringstream os;
+  os << nameLsa;
+
+  BOOST_CHECK_EQUAL(os.str(), "NameLsa("
+                                "LsaInfo("
+                                  "OriginRouter: /test, "
+                                  "SequenceNumber: 128, "
+                                  "ExpirationPeriod: 10000 milliseconds), "
+                                "Name: /test1, "
+                                "Name: /test2)");
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace test
+} // namespace tlv
+} // namespace nlsr
diff --git a/tests/wscript b/tests/wscript
index e7ce752..4ef346f 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -28,7 +28,7 @@
             target='unit-tests-main',
             name='unit-tests-main',
             features='cxx',
-            source=bld.path.ant_glob(['*.cpp', 'utility/*.cpp']),
+            source=bld.path.ant_glob(['*.cpp', 'utility/*.cpp', 'tlv/*.cpp']),
             use='nlsr-objects',
           )
 
