lsa: improved printing and logging

refs: #4354

Change-Id: I27cc99c6d01ba22668f4f56ad57b6f34f24f8af2
diff --git a/tests/mocks/lsa.cpp b/tests/mocks/lsa.cpp
index 3ab6689..d9548a0 100644
--- a/tests/mocks/lsa.cpp
+++ b/tests/mocks/lsa.cpp
@@ -47,5 +47,10 @@
   return true;
 }
 
+void
+MockLsa::writeLog() const
+{
+}
+
 } // namespace test
 } // namespace nlsr
diff --git a/tests/mocks/lsa.hpp b/tests/mocks/lsa.hpp
index 0ce6e3a..5011ab4 100644
--- a/tests/mocks/lsa.hpp
+++ b/tests/mocks/lsa.hpp
@@ -43,6 +43,9 @@
 
   bool
   deserialize(const std::string& content) override;
+
+  void
+  writeLog() const override;
 };
 
 } // namespace test
diff --git a/tests/test-lsa.cpp b/tests/test-lsa.cpp
index 413e393..c5b3ffd 100644
--- a/tests/test-lsa.cpp
+++ b/tests/test-lsa.cpp
@@ -130,21 +130,19 @@
   AdjLsa lsa("router1", 12, testTimePoint, adjList.size(), adjList);
 
   std::string EXPECTED_OUTPUT =
-   "Adj Lsa:\n"
-   "  Origination Router: /router1\n"
-   "  Ls Type: ADJACENCY\n"
-   "  Ls Seq No: 12\n"
-   "  Ls Lifetime: " + TEST_TIME_POINT_STRING + "\n"
-   "  Adjacents: \n"
-   "    Adjacent 1:\n"
-   "      Adjacent Name: /adjacent1\n"
-   "      Connecting FaceUri: ://\n"
-   "      Link Cost: 10\n"
-   "    Adjacent 2:\n"
-   "      Adjacent Name: /adjacent2\n"
-   "      Connecting FaceUri: ://\n"
-   "      Link Cost: 10\n"
-   "adj_lsa_end";
+    "LSA of type ADJACENCY:\n"
+    "-Origin Router: /router1\n"
+    "-Sequence Number: 12\n"
+    "-Expiration Point: " + TEST_TIME_POINT_STRING + "\n"
+    "-Adjacents:--Adjacent1:\n"
+    "---Adjacent Name: /adjacent1\n"
+    "---Connecting FaceUri: ://\n"
+    "---Link Cost: 10\n"
+    "--Adjacent2:\n"
+    "---Adjacent Name: /adjacent2\n"
+    "---Connecting FaceUri: ://\n"
+    "---Link Cost: 10\n"
+    "adj_lsa_end";
 
   std::ostringstream os;
   os << lsa;