diff --git a/tests/src/dbus_environment.cpp b/tests/src/dbus_environment.cpp
index a0f454e..dd00d94 100644
--- a/tests/src/dbus_environment.cpp
+++ b/tests/src/dbus_environment.cpp
@@ -77,9 +77,9 @@
                                      Milliseconds timeout)
 {
     auto& data = futures[std::string(name)];
-    auto ret = waitForFutures(
-        std::move(data), true, [](auto sum, auto val) { return sum && val; },
-        timeout);
+    auto ret = waitForFutures(std::move(data), true, [](auto sum, auto val) {
+        return sum && val;
+    }, timeout);
     data = std::vector<std::future<bool>>{};
     return ret;
 }
diff --git a/tests/src/dbus_environment.hpp b/tests/src/dbus_environment.hpp
index f3f7723..21191ae 100644
--- a/tests/src/dbus_environment.hpp
+++ b/tests/src/dbus_environment.hpp
@@ -82,9 +82,9 @@
         std::vector<std::future<T>> futures;
         futures.emplace_back(std::move(future));
 
-        return waitForFutures(
-            std::move(futures), T{},
-            [](auto, const auto& value) { return value; }, timeout);
+        return waitForFutures(std::move(futures), T{},
+                              [](auto, const auto& value) { return value; },
+                              timeout);
     }
 
     static bool waitForFuture(std::string_view name,
diff --git a/tests/src/stubs/dbus_sensor_object.cpp b/tests/src/stubs/dbus_sensor_object.cpp
index dbe95ca..224e1de 100644
--- a/tests/src/stubs/dbus_sensor_object.cpp
+++ b/tests/src/stubs/dbus_sensor_object.cpp
@@ -14,8 +14,7 @@
     boost::asio::io_context& ioc,
     const std::shared_ptr<sdbusplus::asio::connection>& bus,
     const std::shared_ptr<sdbusplus::asio::object_server>& objServer) :
-    ioc(ioc),
-    bus(bus), objServer(objServer)
+    ioc(ioc), bus(bus), objServer(objServer)
 {
     sensorIface = objServer->add_unique_interface(path(), interface(),
                                                   [this](auto& iface) {
diff --git a/tests/src/test_discrete_threshold.cpp b/tests/src/test_discrete_threshold.cpp
index 43a36c0..36d3a29 100644
--- a/tests/src/test_discrete_threshold.cpp
+++ b/tests/src/test_discrete_threshold.cpp
@@ -135,8 +135,7 @@
 
         UpdateParams(size_t sensor, double value,
                      Milliseconds sleepAfter = 0ms) :
-            sensor(sensor),
-            value(value), sleepAfter(sleepAfter)
+            sensor(sensor), value(value), sleepAfter(sleepAfter)
         {}
     };
 
@@ -148,8 +147,7 @@
 
         ExpectedParams(size_t sensor, double value,
                        Milliseconds waitMin = 0ms) :
-            sensor(sensor),
-            value(value), waitMin(waitMin)
+            sensor(sensor), value(value), waitMin(waitMin)
         {}
     };
 
diff --git a/tests/src/test_numeric_threshold.cpp b/tests/src/test_numeric_threshold.cpp
index a71f003..587a1bb 100644
--- a/tests/src/test_numeric_threshold.cpp
+++ b/tests/src/test_numeric_threshold.cpp
@@ -89,8 +89,7 @@
 
         UpdateParams(size_t sensor, double value,
                      Milliseconds sleepAfter = 0ms) :
-            sensor(sensor),
-            value(value), sleepAfter(sleepAfter)
+            sensor(sensor), value(value), sleepAfter(sleepAfter)
         {}
     };
 
@@ -102,8 +101,7 @@
 
         ExpectedParams(size_t sensor, double value,
                        Milliseconds waitMin = 0ms) :
-            sensor(sensor),
-            value(value), waitMin(waitMin)
+            sensor(sensor), value(value), waitMin(waitMin)
         {}
     };
 
diff --git a/tests/src/test_report.cpp b/tests/src/test_report.cpp
index e4e5510..709efdd 100644
--- a/tests/src/test_report.cpp
+++ b/tests/src/test_report.cpp
@@ -199,8 +199,7 @@
         DbusEnvironment::getBus()->async_method_call(
             [&methodPromise](boost::system::error_code ec) {
             methodPromise.set_value(ec);
-        },
-            DbusEnvironment::serviceName(), path, interface, method);
+        }, DbusEnvironment::serviceName(), path, interface, method);
         return DbusEnvironment::waitForFuture(methodPromise.get_future());
     }
 
@@ -642,8 +641,8 @@
         std::make_pair("ReportActions", nlohmann::json(utils::transform(
                                             defaultParams().reportActions(),
                                             [](const auto v) {
-    return utils::toUnderlying(v);
-}))),
+                                                return utils::toUnderlying(v);
+                                            }))),
         std::make_pair("Interval",
                        nlohmann::json(defaultParams().interval().count())),
         std::make_pair("AppendLimit",
diff --git a/tests/src/test_trigger.cpp b/tests/src/test_trigger.cpp
index 3e5818a..cfe0e15 100644
--- a/tests/src/test_trigger.cpp
+++ b/tests/src/test_trigger.cpp
@@ -141,8 +141,7 @@
         DbusEnvironment::getBus()->async_method_call(
             [&methodPromise](boost::system::error_code ec) {
             methodPromise.set_value(ec);
-        },
-            DbusEnvironment::serviceName(), path, Trigger::deleteIfaceName,
+        }, DbusEnvironment::serviceName(), path, Trigger::deleteIfaceName,
             "Delete");
         return DbusEnvironment::waitForFuture(methodPromise.get_future());
     }
