test: Add dbus handler unit tests

Created unit tests for all of the object mapper dbus handlers.

Refactor the handlers to handler.cpp to allow unit testing.
Also updated to use std::set_intersection.

Change-Id: Ib87ab81f949d27f7dab55899d3e8d380e43bda04
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/src/handler.hpp b/src/handler.hpp
new file mode 100644
index 0000000..74cb234
--- /dev/null
+++ b/src/handler.hpp
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "types.hpp"
+
+#include <string>
+#include <vector>
+
+void addObjectMapResult(std::vector<InterfaceMapType::value_type>& objectMap,
+                        const std::string& objectPath,
+                        const ConnectionNames::value_type& interfaceMap);
+
+std::vector<InterfaceMapType::value_type>
+    getAncestors(const InterfaceMapType& interfaceMap, std::string reqPath,
+                 std::vector<std::string>& interfaces);
+
+ConnectionNames getObject(const InterfaceMapType& interfaceMap,
+                          const std::string& path,
+                          std::vector<std::string>& interfaces);
+
+std::vector<InterfaceMapType::value_type>
+    getSubTree(const InterfaceMapType& interfaceMap, std::string reqPath,
+               int32_t depth, std::vector<std::string>& interfaces);
+
+std::vector<std::string> getSubTreePaths(const InterfaceMapType& interfaceMap,
+                                         std::string reqPath, int32_t depth,
+                                         std::vector<std::string>& interfaces);