ThrowForInvalidGroups: add unit test

This commit adds unit test for the |throwForInvalidGroups| function.

Tested: unit test passed

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I6c004dde1e3a27f60ee7de5cb1775940e19fffc8
diff --git a/user_mgr.hpp b/user_mgr.hpp
index 9f2770d..0195de8 100644
--- a/user_mgr.hpp
+++ b/user_mgr.hpp
@@ -320,6 +320,13 @@
      */
     void throwForInvalidPrivilege(const std::string& priv);
 
+    /** @brief check for valid groups
+     *  method to check valid groups, and throw if invalid
+     *
+     *  @param[in] groupNames - user groups
+     */
+    void throwForInvalidGroups(const std::vector<std::string>& groupName);
+
   private:
     /** @brief sdbusplus handler */
     sdbusplus::bus_t& bus;
@@ -355,13 +362,6 @@
      */
     UserSSHLists getUserAndSshGrpList(void);
 
-    /** @brief check for valid groups
-     *  method to check valid groups, and throw if invalid
-     *
-     *  @param[in] groupNames - user groups
-     */
-    void throwForInvalidGroups(const std::vector<std::string>& groupName);
-
     /** @brief get user enabled state
      *  method to get user enabled state.
      *