diff --git a/include/EntityManager.hpp b/include/EntityManager.hpp
index 540d9a6..eb8a86d 100644
--- a/include/EntityManager.hpp
+++ b/include/EntityManager.hpp
@@ -35,11 +35,11 @@
     std::string,
     boost::container::flat_map<
         std::string,
-        boost::container::flat_map<std::string, BasicVariantType>>>;
+        boost::container::flat_map<std::string, DBusValueVariant>>>;
 
 // vector of tuple<map<propertyName, variant>, D-Bus path>>
 using FoundDeviceT = std::vector<std::tuple<
-    boost::container::flat_map<std::string, BasicVariantType>, std::string>>;
+    boost::container::flat_map<std::string, DBusValueVariant>, std::string>>;
 
 struct CmpStr
 {
diff --git a/include/Utils.hpp b/include/Utils.hpp
index eb8b8f1..fa155f9 100644
--- a/include/Utils.hpp
+++ b/include/Utils.hpp
@@ -32,7 +32,7 @@
 
 extern boost::asio::io_context io;
 
-using BasicVariantType =
+using DBusValueVariant =
     std::variant<std::string, int64_t, uint64_t, double, int32_t, uint32_t,
                  int16_t, uint16_t, uint8_t, bool, std::vector<uint8_t>>;
 
@@ -139,14 +139,14 @@
 std::optional<std::string> templateCharReplace(
     nlohmann::json::iterator& keyPair,
     const boost::container::flat_map<
-        std::string, boost::container::flat_map<std::string, BasicVariantType>>&
+        std::string, boost::container::flat_map<std::string, DBusValueVariant>>&
         allInterfaces,
     const size_t foundDeviceIdx,
     const std::optional<std::string>& replaceStr = std::nullopt);
 
 std::optional<std::string> templateCharReplace(
     nlohmann::json::iterator& keyPair,
-    const boost::container::flat_map<std::string, BasicVariantType>&
+    const boost::container::flat_map<std::string, DBusValueVariant>&
         foundDevice,
     const size_t foundDeviceIdx,
     const std::optional<std::string>& replaceStr = std::nullopt);
@@ -172,4 +172,4 @@
 /// \param probe the probe statement to match against.
 /// \param dbusValue the property value being matched to a probe.
 /// \return true if the dbusValue matched the probe otherwise false.
-bool matchProbe(const nlohmann::json& probe, const BasicVariantType& dbusValue);
+bool matchProbe(const nlohmann::json& probe, const DBusValueVariant& dbusValue);
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index 493dbfb..adbf134 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -70,7 +70,7 @@
     sdbusplus::message::object_path,
     boost::container::flat_map<
         std::string,
-        boost::container::flat_map<std::string, BasicVariantType>>>;
+        boost::container::flat_map<std::string, DBusValueVariant>>>;
 
 // store reference to all interfaces so we can destroy them later
 boost::container::flat_map<
diff --git a/src/PerformProbe.cpp b/src/PerformProbe.cpp
index adf45d6..690ce15 100644
--- a/src/PerformProbe.cpp
+++ b/src/PerformProbe.cpp
@@ -43,7 +43,7 @@
         foundProbe = true;
 
         bool deviceMatches = true;
-        const boost::container::flat_map<std::string, BasicVariantType>&
+        const boost::container::flat_map<std::string, DBusValueVariant>&
             properties = it->second;
 
         for (const auto& [matchProp, matchJSON] : matches)
@@ -197,7 +197,7 @@
     if (ret && foundDevs.size() == 0)
     {
         foundDevs.emplace_back(
-            boost::container::flat_map<std::string, BasicVariantType>{},
+            boost::container::flat_map<std::string, DBusValueVariant>{},
             std::string{});
     }
     if (matchOne && ret)
diff --git a/src/PerformScan.cpp b/src/PerformScan.cpp
index dd3e3d4..5d05403 100644
--- a/src/PerformScan.cpp
+++ b/src/PerformScan.cpp
@@ -53,7 +53,7 @@
     systemBus->async_method_call(
         [call, scan, probeVector, retries](
             boost::system::error_code& errc,
-            const boost::container::flat_map<std::string, BasicVariantType>&
+            const boost::container::flat_map<std::string, DBusValueVariant>&
                 resp) {
             if (errc)
             {
@@ -211,7 +211,7 @@
 }
 
 std::string getRecordName(
-    const boost::container::flat_map<std::string, BasicVariantType>& probe,
+    const boost::container::flat_map<std::string, DBusValueVariant>& probe,
     const std::string& probeName)
 {
     if (probe.empty())
@@ -379,14 +379,14 @@
                 std::optional<std::string> replaceStr;
 
                 MapperGetSubTreeResponse::mapped_type emptyInterfaces;
-                boost::container::flat_map<std::string, BasicVariantType>
+                boost::container::flat_map<std::string, DBusValueVariant>
                     emptyProps;
                 emptyInterfaces.emplace(std::string{}, emptyProps);
 
                 for (auto& foundDeviceAndPath : foundDevices)
                 {
                     const boost::container::flat_map<
-                        std::string, BasicVariantType>& foundDevice =
+                        std::string, DBusValueVariant>& foundDevice =
                         std::get<0>(foundDeviceAndPath);
                     const std::string& path = std::get<1>(foundDeviceAndPath);
 
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 31a10bc..48c04fa 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -190,7 +190,7 @@
 std::optional<std::string> templateCharReplace(
     nlohmann::json::iterator& keyPair,
     const boost::container::flat_map<
-        std::string, boost::container::flat_map<std::string, BasicVariantType>>&
+        std::string, boost::container::flat_map<std::string, DBusValueVariant>>&
         allInterfaces,
     const size_t foundDeviceIdx, const std::optional<std::string>& replaceStr)
 {
@@ -211,7 +211,7 @@
 // ADDRESS field from a object on dbus
 std::optional<std::string> templateCharReplace(
     nlohmann::json::iterator& keyPair,
-    const boost::container::flat_map<std::string, BasicVariantType>&
+    const boost::container::flat_map<std::string, DBusValueVariant>&
         foundDevice,
     const size_t foundDeviceIdx, const std::optional<std::string>& replaceStr)
 {
@@ -456,7 +456,7 @@
 /// \brief JSON/DBus matching Callable for std::variant (visitor)
 ///
 /// Default match JSON/DBus match implementation
-/// \tparam T The concrete DBus value type from BasicVariantType
+/// \tparam T The concrete DBus value type from DBusValueVariant
 template <typename T>
 struct MatchProbe
 {
@@ -517,7 +517,7 @@
     }
 };
 
-bool matchProbe(const nlohmann::json& probe, const BasicVariantType& dbusValue)
+bool matchProbe(const nlohmann::json& probe, const DBusValueVariant& dbusValue)
 {
     return std::visit(MatchProbeForwarder(probe), dbusValue);
 }
diff --git a/test/test_entity-manager.cpp b/test/test_entity-manager.cpp
index deaf06c..fbef838 100644
--- a/test/test_entity-manager.cpp
+++ b/test/test_entity-manager.cpp
@@ -14,7 +14,7 @@
 {
     nlohmann::json j = {{"foo", "$bus"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["BUS"] = 23;
 
     templateCharReplace(it, data, 0);
@@ -27,7 +27,7 @@
 {
     nlohmann::json j = {{"foo", "$TEST"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = std::string("Test");
 
     templateCharReplace(it, data, 0);
@@ -40,7 +40,7 @@
 {
     nlohmann::json j = {{"foo", "the $TEST"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = std::string("Test");
 
     templateCharReplace(it, data, 0);
@@ -53,7 +53,7 @@
 {
     nlohmann::json j = {{"foo", "the $TEST worked"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = std::string("Test");
 
     templateCharReplace(it, data, 0);
@@ -66,7 +66,7 @@
 {
     nlohmann::json j = {{"foo", "the Test $TEST"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = 23;
 
     templateCharReplace(it, data, 0);
@@ -79,7 +79,7 @@
 {
     nlohmann::json j = {{"foo", "3 plus 1 equals $TEST + 1"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = 3;
 
     templateCharReplace(it, data, 0);
@@ -92,7 +92,7 @@
 {
     nlohmann::json j = {{"foo", "3 minus 1 equals $TEST - 1 !"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = 3;
 
     templateCharReplace(it, data, 0);
@@ -105,7 +105,7 @@
 {
     nlohmann::json j = {{"foo", "3 mod 2 equals $TEST % 2"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = 3;
 
     templateCharReplace(it, data, 0);
@@ -118,7 +118,7 @@
 {
     nlohmann::json j = {{"foo", "3 * 2 equals $TEST * 2"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = 3;
 
     templateCharReplace(it, data, 0);
@@ -131,7 +131,7 @@
 {
     nlohmann::json j = {{"foo", "4 / 2 equals $TEST / 2"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = 4;
 
     templateCharReplace(it, data, 0);
@@ -144,7 +144,7 @@
 {
     nlohmann::json j = {{"foo", "4 * 2 % 6 equals $TEST * 2 % 6"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = 4;
 
     templateCharReplace(it, data, 0);
@@ -157,7 +157,7 @@
 {
     nlohmann::json j = {{"foo", "$FOO $BAR"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["FOO"] = std::string("foo");
     data["BAR"] = std::string("bar");
 
@@ -171,7 +171,7 @@
 {
     nlohmann::json j = {{"foo", "4 / 2 equals $TEST / 2 $BAR"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["TEST"] = 4;
     data["BAR"] = std::string("bar");
 
@@ -184,7 +184,7 @@
 {
     nlohmann::json j = {{"foo", "4 / 2 equals $ADDRESS / 2 $BAR"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["ADDRESS"] = 4;
     data["BAR"] = std::string("bar");
 
@@ -201,7 +201,7 @@
                         {"Name", "$bus sensor 0"},
                         {"Type", "SomeType"}};
 
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["BUS"] = 15;
 
     for (auto it = j.begin(); it != j.end(); it++)
@@ -219,7 +219,7 @@
 {
     nlohmann::json j = {{"foo", "twelve is $TEST"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
     data["test"] = 12;
 
     templateCharReplace(it, data, 0);
@@ -232,7 +232,7 @@
 {
     nlohmann::json j = {{"foo", "0x54"}};
     auto it = j.begin();
-    boost::container::flat_map<std::string, BasicVariantType> data;
+    boost::container::flat_map<std::string, DBusValueVariant> data;
 
     templateCharReplace(it, data, 0);
 
@@ -243,642 +243,642 @@
 TEST(MatchProbe, stringEqString)
 {
     nlohmann::json j = R"("foo")"_json;
-    BasicVariantType v = "foo"s;
+    DBusValueVariant v = "foo"s;
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringRegexEqString)
 {
     nlohmann::json j = R"("foo*")"_json;
-    BasicVariantType v = "foobar"s;
+    DBusValueVariant v = "foobar"s;
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringNeqString)
 {
     nlohmann::json j = R"("foobar")"_json;
-    BasicVariantType v = "foo"s;
+    DBusValueVariant v = "foo"s;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringRegexError)
 {
     nlohmann::json j = R"("foo[")"_json;
-    BasicVariantType v = "foobar"s;
+    DBusValueVariant v = "foobar"s;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringZeroNeqFalse)
 {
     nlohmann::json j = R"("0")"_json;
-    BasicVariantType v = false;
+    DBusValueVariant v = false;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringOneNeqTrue)
 {
     nlohmann::json j = R"("1")"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringElevenNeqTrue)
 {
     nlohmann::json j = R"("11")"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringFalseNeqFalse)
 {
     nlohmann::json j = R"("false")"_json;
-    BasicVariantType v = false;
+    DBusValueVariant v = false;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringTrueNeqTrue)
 {
     nlohmann::json j = R"("true")"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringFalseNeqTrue)
 {
     nlohmann::json j = R"("false")"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringNeqUint8)
 {
     nlohmann::json j = R"("255")"_json;
-    BasicVariantType v = uint8_t(255);
+    DBusValueVariant v = uint8_t(255);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringNeqUint8Overflow)
 {
     nlohmann::json j = R"("65535")"_json;
-    BasicVariantType v = uint8_t(255);
+    DBusValueVariant v = uint8_t(255);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringFalseNeqUint8Zero)
 {
     nlohmann::json j = R"("false")"_json;
-    BasicVariantType v = uint8_t(0);
+    DBusValueVariant v = uint8_t(0);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringTrueNeqUint8Zero)
 {
     nlohmann::json j = R"("true")"_json;
-    BasicVariantType v = uint8_t(1);
+    DBusValueVariant v = uint8_t(1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringNeqUint32)
 {
     nlohmann::json j = R"("11")"_json;
-    BasicVariantType v = uint32_t(11);
+    DBusValueVariant v = uint32_t(11);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringNeqInt32)
 {
     nlohmann::json j = R"("-11")"_json;
-    BasicVariantType v = int32_t(-11);
+    DBusValueVariant v = int32_t(-11);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringRegexNeqInt32)
 {
     nlohmann::json j = R"("1*4")"_json;
-    BasicVariantType v = int32_t(124);
+    DBusValueVariant v = int32_t(124);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringNeqUint64)
 {
     nlohmann::json j = R"("foo")"_json;
-    BasicVariantType v = uint64_t(65535);
+    DBusValueVariant v = uint64_t(65535);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringNeqDouble)
 {
     nlohmann::json j = R"("123.4")"_json;
-    BasicVariantType v = double(123.4);
+    DBusValueVariant v = double(123.4);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringNeqEmpty)
 {
     nlohmann::json j = R"("-123.4")"_json;
-    BasicVariantType v;
+    DBusValueVariant v;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, stringNeqArray)
 {
     nlohmann::json j = R"("-123.4")"_json;
-    BasicVariantType v = std::vector<uint8_t>{1, 2};
+    DBusValueVariant v = std::vector<uint8_t>{1, 2};
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, boolNeqString)
 {
     nlohmann::json j = R"(false)"_json;
-    BasicVariantType v = "false"s;
+    DBusValueVariant v = "false"s;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, trueEqTrue)
 {
     nlohmann::json j = R"(true)"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, falseEqFalse)
 {
     nlohmann::json j = R"(false)"_json;
-    BasicVariantType v = false;
+    DBusValueVariant v = false;
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, trueNeqFalse)
 {
     nlohmann::json j = R"(true)"_json;
-    BasicVariantType v = false;
+    DBusValueVariant v = false;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, trueNeqInt32Zero)
 {
     nlohmann::json j = R"(true)"_json;
-    BasicVariantType v = int32_t(0);
+    DBusValueVariant v = int32_t(0);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, trueNeqInt32NegativeOne)
 {
     nlohmann::json j = R"(true)"_json;
-    BasicVariantType v = int32_t(-1);
+    DBusValueVariant v = int32_t(-1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, falseNeqUint32One)
 {
     nlohmann::json j = R"(false)"_json;
-    BasicVariantType v = uint32_t(1);
+    DBusValueVariant v = uint32_t(1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, falseNeqUint32Zero)
 {
     nlohmann::json j = R"(false)"_json;
-    BasicVariantType v = uint32_t(0);
+    DBusValueVariant v = uint32_t(0);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, trueNeqDoubleNegativeOne)
 {
     nlohmann::json j = R"(true)"_json;
-    BasicVariantType v = double(-1.1);
+    DBusValueVariant v = double(-1.1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, trueNeqDoubleOne)
 {
     nlohmann::json j = R"(true)"_json;
-    BasicVariantType v = double(1.0);
+    DBusValueVariant v = double(1.0);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, falseNeqDoubleOne)
 {
     nlohmann::json j = R"(false)"_json;
-    BasicVariantType v = double(1.0);
+    DBusValueVariant v = double(1.0);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, falseNeqDoubleZero)
 {
     nlohmann::json j = R"(false)"_json;
-    BasicVariantType v = double(0.0);
+    DBusValueVariant v = double(0.0);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, falseNeqEmpty)
 {
     nlohmann::json j = R"(false)"_json;
-    BasicVariantType v;
+    DBusValueVariant v;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, trueNeqEmpty)
 {
     nlohmann::json j = R"(true)"_json;
-    BasicVariantType v;
+    DBusValueVariant v;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, trueNeqArray)
 {
     nlohmann::json j = R"(true)"_json;
-    BasicVariantType v = std::vector<uint8_t>{1, 2};
+    DBusValueVariant v = std::vector<uint8_t>{1, 2};
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintNeqString)
 {
     nlohmann::json j = R"(11)"_json;
-    BasicVariantType v = "11"s;
+    DBusValueVariant v = "11"s;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintNeqTrue)
 {
     nlohmann::json j = R"(1)"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintNeqFalse)
 {
     nlohmann::json j = R"(0)"_json;
-    BasicVariantType v = false;
+    DBusValueVariant v = false;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintEqUint8)
 {
     nlohmann::json j = R"(11)"_json;
-    BasicVariantType v = uint8_t(11);
+    DBusValueVariant v = uint8_t(11);
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintNeqUint8)
 {
     nlohmann::json j = R"(11)"_json;
-    BasicVariantType v = uint8_t(12);
+    DBusValueVariant v = uint8_t(12);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintNeqUint8Overflow)
 {
     nlohmann::json j = R"(65535)"_json;
-    BasicVariantType v = uint8_t(255);
+    DBusValueVariant v = uint8_t(255);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintEqInt8)
 {
     nlohmann::json j = R"(11)"_json;
-    BasicVariantType v = int8_t(11);
+    DBusValueVariant v = int8_t(11);
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintEqDouble)
 {
     nlohmann::json j = R"(11)"_json;
-    BasicVariantType v = double(11.0);
+    DBusValueVariant v = double(11.0);
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintNeqDouble)
 {
     nlohmann::json j = R"(11)"_json;
-    BasicVariantType v = double(11.7);
+    DBusValueVariant v = double(11.7);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintNeqEmpty)
 {
     nlohmann::json j = R"(11)"_json;
-    BasicVariantType v;
+    DBusValueVariant v;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, uintNeqArray)
 {
     nlohmann::json j = R"(11)"_json;
-    BasicVariantType v = std::vector<uint8_t>{11};
+    DBusValueVariant v = std::vector<uint8_t>{11};
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, intNeqString)
 {
     nlohmann::json j = R"(-11)"_json;
-    BasicVariantType v = "-11"s;
+    DBusValueVariant v = "-11"s;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, intNeqTrue)
 {
     nlohmann::json j = R"(-1)"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, intNeqUint8)
 {
     nlohmann::json j = R"(-11)"_json;
-    BasicVariantType v = uint8_t(11);
+    DBusValueVariant v = uint8_t(11);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, intEqInt8)
 {
     nlohmann::json j = R"(-11)"_json;
-    BasicVariantType v = int8_t(-11);
+    DBusValueVariant v = int8_t(-11);
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, intNeqDouble)
 {
     nlohmann::json j = R"(-124)"_json;
-    BasicVariantType v = double(-123.0);
+    DBusValueVariant v = double(-123.0);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, intEqDouble)
 {
     nlohmann::json j = R"(-11)"_json;
-    BasicVariantType v = double(-11.0);
+    DBusValueVariant v = double(-11.0);
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, intNeqDoubleRound)
 {
     nlohmann::json j = R"(-11)"_json;
-    BasicVariantType v = double(-11.7);
+    DBusValueVariant v = double(-11.7);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, intNeqEmpty)
 {
     nlohmann::json j = R"(-11)"_json;
-    BasicVariantType v;
+    DBusValueVariant v;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, intNeqArray)
 {
     nlohmann::json j = R"(-11)"_json;
-    BasicVariantType v = std::vector<uint8_t>{11};
+    DBusValueVariant v = std::vector<uint8_t>{11};
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, doubleNeqString)
 {
     nlohmann::json j = R"(0.0)"_json;
-    BasicVariantType v = "0.0"s;
+    DBusValueVariant v = "0.0"s;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, doubleNeqFalse)
 {
     nlohmann::json j = R"(0.0)"_json;
-    BasicVariantType v = false;
+    DBusValueVariant v = false;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, doubleNeqTrue)
 {
     nlohmann::json j = R"(1.0)"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, doubleEqInt32)
 {
     nlohmann::json j = R"(-124.0)"_json;
-    BasicVariantType v = int32_t(-124);
+    DBusValueVariant v = int32_t(-124);
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, doubleNeqInt32)
 {
     nlohmann::json j = R"(-124.0)"_json;
-    BasicVariantType v = int32_t(-123);
+    DBusValueVariant v = int32_t(-123);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, doubleRoundNeqInt)
 {
     nlohmann::json j = R"(124.7)"_json;
-    BasicVariantType v = int32_t(124);
+    DBusValueVariant v = int32_t(124);
     EXPECT_FALSE(matchProbe(j, v));
 }
 TEST(MatchProbe, doubleEqDouble)
 {
     nlohmann::json j = R"(-124.2)"_json;
-    BasicVariantType v = double(-124.2);
+    DBusValueVariant v = double(-124.2);
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, doubleNeqDouble)
 {
     nlohmann::json j = R"(-124.3)"_json;
-    BasicVariantType v = double(-124.2);
+    DBusValueVariant v = double(-124.2);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, doubleNeqEmpty)
 {
     nlohmann::json j = R"(-11.0)"_json;
-    BasicVariantType v;
+    DBusValueVariant v;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, doubleNeqArray)
 {
     nlohmann::json j = R"(-11.2)"_json;
-    BasicVariantType v = std::vector<uint8_t>{11};
+    DBusValueVariant v = std::vector<uint8_t>{11};
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, arrayNeqString)
 {
     nlohmann::json j = R"([1, 2])"_json;
-    BasicVariantType v = "hello"s;
+    DBusValueVariant v = "hello"s;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, arrayNeqFalse)
 {
     nlohmann::json j = R"([1, 2])"_json;
-    BasicVariantType v = false;
+    DBusValueVariant v = false;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, arrayNeqTrue)
 {
     nlohmann::json j = R"([1, 2])"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, arrayNeqUint8)
 {
     nlohmann::json j = R"([1, 2])"_json;
-    BasicVariantType v = uint8_t(1);
+    DBusValueVariant v = uint8_t(1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, arrayNeqInt32)
 {
     nlohmann::json j = R"([1, 2])"_json;
-    BasicVariantType v = int32_t(-1);
+    DBusValueVariant v = int32_t(-1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, arrayNeqDouble)
 {
     nlohmann::json j = R"([1, 2])"_json;
-    BasicVariantType v = double(1.1);
+    DBusValueVariant v = double(1.1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, arrayEqArray)
 {
     nlohmann::json j = R"([1, 2])"_json;
-    BasicVariantType v = std::vector<uint8_t>{1, 2};
+    DBusValueVariant v = std::vector<uint8_t>{1, 2};
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, arrayNeqArrayDiffSize1)
 {
     nlohmann::json j = R"([1, 2, 3])"_json;
-    BasicVariantType v = std::vector<uint8_t>{1, 2};
+    DBusValueVariant v = std::vector<uint8_t>{1, 2};
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, arrayNeqArrayDiffSize2)
 {
     nlohmann::json j = R"([1, 2])"_json;
-    BasicVariantType v = std::vector<uint8_t>{1, 2, 3};
+    DBusValueVariant v = std::vector<uint8_t>{1, 2, 3};
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, emptyArrayEqEmptyArray)
 {
     nlohmann::json j = R"([])"_json;
-    BasicVariantType v = std::vector<uint8_t>{};
+    DBusValueVariant v = std::vector<uint8_t>{};
     EXPECT_TRUE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, emptyArrayNeqArray)
 {
     nlohmann::json j = R"([])"_json;
-    BasicVariantType v = std::vector<uint8_t>{1};
+    DBusValueVariant v = std::vector<uint8_t>{1};
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, arrayNeqEmptyArray)
 {
     nlohmann::json j = R"([1])"_json;
-    BasicVariantType v = std::vector<uint8_t>{};
+    DBusValueVariant v = std::vector<uint8_t>{};
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, objNeqString)
 {
     nlohmann::json j = R"({"foo": "bar"})"_json;
-    BasicVariantType v = "hello"s;
+    DBusValueVariant v = "hello"s;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, objNeqFalse)
 {
     nlohmann::json j = R"({"foo": "bar"})"_json;
-    BasicVariantType v = false;
+    DBusValueVariant v = false;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, objNeqTrue)
 {
     nlohmann::json j = R"({"foo": "bar"})"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, objNeqUint8)
 {
     nlohmann::json j = R"({"foo": "bar"})"_json;
-    BasicVariantType v = uint8_t(1);
+    DBusValueVariant v = uint8_t(1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, objNeqInt32)
 {
     nlohmann::json j = R"({"foo": "bar"})"_json;
-    BasicVariantType v = int32_t(-1);
+    DBusValueVariant v = int32_t(-1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, objNeqDouble)
 {
     nlohmann::json j = R"({"foo": "bar"})"_json;
-    BasicVariantType v = double(1.1);
+    DBusValueVariant v = double(1.1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, objNeqArray)
 {
     nlohmann::json j = R"({"foo": "bar"})"_json;
-    BasicVariantType v = std::vector<uint8_t>{1, 2};
+    DBusValueVariant v = std::vector<uint8_t>{1, 2};
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, nullNeqString)
 {
     nlohmann::json j = R"(null)"_json;
-    BasicVariantType v = "hello"s;
+    DBusValueVariant v = "hello"s;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, nullNeqFalse)
 {
     nlohmann::json j = R"(null)"_json;
-    BasicVariantType v = false;
+    DBusValueVariant v = false;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, nullNeqTrue)
 {
     nlohmann::json j = R"(null)"_json;
-    BasicVariantType v = true;
+    DBusValueVariant v = true;
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, nullNeqUint8)
 {
     nlohmann::json j = R"(null)"_json;
-    BasicVariantType v = uint8_t(1);
+    DBusValueVariant v = uint8_t(1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, nullNeqInt32)
 {
     nlohmann::json j = R"(null)"_json;
-    BasicVariantType v = int32_t(-1);
+    DBusValueVariant v = int32_t(-1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, nullNeqDouble)
 {
     nlohmann::json j = R"(null)"_json;
-    BasicVariantType v = double(1.1);
+    DBusValueVariant v = double(1.1);
     EXPECT_FALSE(matchProbe(j, v));
 }
 
 TEST(MatchProbe, nullNeqArray)
 {
     nlohmann::json j = R"(null)"_json;
-    BasicVariantType v = std::vector<uint8_t>{};
+    DBusValueVariant v = std::vector<uint8_t>{};
     EXPECT_FALSE(matchProbe(j, v));
 }
