Add initial unit tests

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Id4850e52073ea6780a978c6cd5a5c439aa8ed846
diff --git a/test/mocked_utils.hpp b/test/mocked_utils.hpp
new file mode 100644
index 0000000..8cd4a43
--- /dev/null
+++ b/test/mocked_utils.hpp
@@ -0,0 +1,39 @@
+#pragma once
+
+#include "utils.hpp"
+
+#include <gmock/gmock.h>
+
+namespace utils
+{
+
+class MockedUtils : public UtilsInterface
+{
+  public:
+    virtual ~MockedUtils() = default;
+
+    MOCK_CONST_METHOD3(getService,
+                       std::string(sdbusplus::bus::bus& bus, const char* path,
+                                   const char* interface));
+
+    MOCK_CONST_METHOD3(getServices,
+                       std::vector<std::string>(sdbusplus::bus::bus& bus,
+                                                const char* path,
+                                                const char* interface));
+
+    MOCK_CONST_METHOD5(getPropertyImpl,
+                       any(sdbusplus::bus::bus& bus, const char* service,
+                           const char* path, const char* interface,
+                           const char* propertyName));
+
+    MOCK_CONST_METHOD6(setPropertyImpl,
+                       void(sdbusplus::bus::bus& bus, const char* service,
+                            const char* path, const char* interface,
+                            const char* propertyName, ValueType&& value));
+};
+
+const UtilsInterface& getUtils();
+
+void freeUtils();
+
+} // namespace utils