Test cases for VPD-Manager editor functionalities

Implementation of test cases for editor functionalities provided
by VPD-Manager app.

Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: I6281f2be898f95e37c9575ea12affe57744a0cab
diff --git a/vpd-manager/editor_impl.hpp b/vpd-manager/editor_impl.hpp
index ac8909c..b3d24f7 100644
--- a/vpd-manager/editor_impl.hpp
+++ b/vpd-manager/editor_impl.hpp
@@ -53,6 +53,17 @@
      *
      *  @param[in] path - Path to the vpd file
      */
+    EditorImpl(const std::string& record, const std::string& kwd,
+               Binary&& vpd) :
+        thisRecord(record, kwd),
+        vpdFile(std::move(vpd))
+    {
+    }
+
+    /** @brief Construct EditorImpl class
+     *
+     *  @param[in] path - Path to the vpd file
+     */
     EditorImpl(const inventory::Path& path, const nlohmann::json& json,
                const std::string& record, const std::string& kwd) :
         vpdFilePath(path),
@@ -140,20 +151,20 @@
                       const std::string& property, const std::variant<T>& data);
 
     // path to the VPD file to edit
-    const inventory::Path& vpdFilePath;
+    const inventory::Path vpdFilePath;
 
     // stream to perform operation on file
     std::fstream vpdFileStream;
 
     // file to store parsed json
-    const nlohmann::json& jsonFile;
+    const nlohmann::json jsonFile;
 
     // structure to hold info about record to edit
     struct RecInfo
     {
         Binary kwdUpdatedData; // need access to it in case encoding is needed
-        const std::string& recName;
-        const std::string& recKWd;
+        const std::string recName;
+        const std::string recKWd;
         openpower::vpd::constants::RecordOffset recOffset;
         openpower::vpd::constants::ECCOffset recECCoffset;
         std::size_t recECCLength;