Bug-fix: wireEncode "corrupts" implicit digest
* Removed wireEncde()
* Implemented finalize()
* Minor change to constructor to resolve code quality warnings (-Weffc++)

Refs: #3490

Change-Id: Ic943e12b0fd2d24dbfe46e7f5824051d308fb0ec
diff --git a/tests/unit-tests/file-manifest.t.cpp b/tests/unit-tests/file-manifest.t.cpp
index 4bc69bd..a8181ad 100644
--- a/tests/unit-tests/file-manifest.t.cpp
+++ b/tests/unit-tests/file-manifest.t.cpp
@@ -270,19 +270,21 @@
                   std::make_shared<Name>("/file0/1/5E6F7G8H"));
 
   KeyChain keyChain;
+  m1.finalize();
   keyChain.sign(m1);
   BOOST_CHECK_EQUAL(m1, FileManifest(m1.wireEncode()));
 
   // Change value and be sure that wireEncoding still works
   m1.remove("/foo/2/CAFEBABE");
+  m1.finalize();
   keyChain.sign(m1);
-
   BOOST_CHECK_EQUAL(m1, FileManifest(m1.wireEncode()));
 
   // Explicitly call wireEncode and ensure the value works
   FileManifest m2 = m1;
   m1.remove("/foo/0/ABC123");
   keyChain.sign(m1);
+  m1.finalize();
   m2.wireDecode(m1.wireEncode());
   BOOST_CHECK_EQUAL(m1, m2);
 }