diff --git a/tests/src/dbus_environment.hpp b/tests/src/dbus_environment.hpp
index 1006323..f3f7723 100644
--- a/tests/src/dbus_environment.hpp
+++ b/tests/src/dbus_environment.hpp
@@ -110,7 +110,7 @@
                 return;
             }
             propertyPromise.set_value(t);
-            });
+        });
         return DbusEnvironment::waitForFuture(std::move(propertyFuture));
     }
 
@@ -127,7 +127,7 @@
             [promise = std::move(promise)](
                 boost::system::error_code ec) mutable {
             promise.set_value(ec);
-            });
+        });
         return DbusEnvironment::waitForFuture(std::move(future));
     }
 
@@ -142,7 +142,7 @@
             [promise = std::move(promise)](
                 boost::system::error_code ec) mutable {
             promise.set_value(ec);
-            },
+        },
             DbusEnvironment::serviceName(), path, interface, method,
             std::forward<Args>(args)...);
         return DbusEnvironment::waitForFuture(std::move(future));
diff --git a/tests/src/mocks/report_factory_mock.hpp b/tests/src/mocks/report_factory_mock.hpp
index deed82d..7cf4489 100644
--- a/tests/src/mocks/report_factory_mock.hpp
+++ b/tests/src/mocks/report_factory_mock.hpp
@@ -14,12 +14,11 @@
     {
         return utils::transform(readingParams, [](const auto& params) {
             return LabeledMetricParameters(
-                utils::transform(
-                    std::get<0>(params),
-                    [](const auto& sensorData) {
+                utils::transform(std::get<0>(params),
+                                 [](const auto& sensorData) {
                 return LabeledSensorInfo("Service", std::get<0>(sensorData),
                                          std::get<1>(sensorData));
-                    }),
+            }),
                 utils::toOperationType(std::get<1>(params)),
                 utils::toCollectionTimeScope(std::get<2>(params)),
                 CollectionDuration(Milliseconds(std::get<3>(params))));
@@ -42,8 +41,8 @@
         ON_CALL(*this,
                 make(A<const std::string&>(), _, _, _, _, _, _, _, _, _, _, _))
             .WillByDefault(WithArgs<0>(Invoke([](const std::string& id) {
-                return std::make_unique<NiceMock<ReportMock>>(id);
-            })));
+            return std::make_unique<NiceMock<ReportMock>>(id);
+        })));
     }
 
     MOCK_METHOD(std::vector<LabeledMetricParameters>, convertMetricParams,
diff --git a/tests/src/mocks/trigger_factory_mock.hpp b/tests/src/mocks/trigger_factory_mock.hpp
index f1dfa1f..a733ca4 100644
--- a/tests/src/mocks/trigger_factory_mock.hpp
+++ b/tests/src/mocks/trigger_factory_mock.hpp
@@ -18,8 +18,8 @@
 
         ON_CALL(*this, make(A<const std::string&>(), _, _, _, _, _, _, _))
             .WillByDefault(WithArgs<0>(Invoke([](const std::string& id) {
-                return std::make_unique<NiceMock<TriggerMock>>(id);
-            })));
+            return std::make_unique<NiceMock<TriggerMock>>(id);
+        })));
     }
 
     MOCK_METHOD(std::unique_ptr<interfaces::Trigger>, make,
@@ -73,11 +73,10 @@
 
             return EXPECT_CALL(
                 *this, make(params.id(), params.name(),
-                            utils::transform(
-                                params.triggerActions(),
-                                [](const auto& action) {
+                            utils::transform(params.triggerActions(),
+                                             [](const auto& action) {
                 return actionToString(action);
-                                }),
+            }),
                             params.reportIds(), tm, triggerStorage,
                             params.thresholdParams(), params.sensors()));
         }
diff --git a/tests/src/test_discrete_threshold.cpp b/tests/src/test_discrete_threshold.cpp
index 8b9168b..43a36c0 100644
--- a/tests/src/test_discrete_threshold.cpp
+++ b/tests/src/test_discrete_threshold.cpp
@@ -61,8 +61,8 @@
     {
         EXPECT_CALL(*sensor,
                     registerForUpdates(Truly([sut = sut.get()](const auto& x) {
-                        return x.lock().get() == sut;
-                    })));
+            return x.lock().get() == sut;
+        })));
     }
 
     sut->initialize();
@@ -232,9 +232,8 @@
                                TriggerValue(GetParam().thresholdValue)))
                 .WillOnce(DoAll(
                     InvokeWithoutArgs([idx = index, &timestamps] {
-                        timestamps[idx] =
-                            std::chrono::high_resolution_clock::now();
-                    }),
+                timestamps[idx] = std::chrono::high_resolution_clock::now();
+            }),
                     InvokeWithoutArgs(DbusEnvironment::setPromise("commit"))));
         }
 
diff --git a/tests/src/test_metric.cpp b/tests/src/test_metric.cpp
index 6410337..f042c9e 100644
--- a/tests/src/test_metric.cpp
+++ b/tests/src/test_metric.cpp
@@ -66,8 +66,8 @@
 
     EXPECT_CALL(*sensorMocks.front(),
                 registerForUpdates(Truly([sut = sut.get()](const auto& a0) {
-                    return a0.lock().get() == sut;
-                })));
+        return a0.lock().get() == sut;
+    })));
 
     sut->initialize();
 }
@@ -78,8 +78,8 @@
 
     EXPECT_CALL(*sensorMocks.front(),
                 unregisterFromUpdates(Truly([sut = sut.get()](const auto& a0) {
-                    return a0.lock().get() == sut;
-                })));
+        return a0.lock().get() == sut;
+    })));
 
     sut->deinitialize();
 }
diff --git a/tests/src/test_numeric_threshold.cpp b/tests/src/test_numeric_threshold.cpp
index 902e72f..a71f003 100644
--- a/tests/src/test_numeric_threshold.cpp
+++ b/tests/src/test_numeric_threshold.cpp
@@ -60,8 +60,8 @@
     {
         EXPECT_CALL(*sensor,
                     registerForUpdates(Truly([sut = sut.get()](const auto& x) {
-                        return x.lock().get() == sut;
-                    })));
+            return x.lock().get() == sut;
+        })));
     }
 
     sut->initialize();
@@ -207,9 +207,8 @@
                                _, TriggerValue(value)))
                 .WillOnce(DoAll(
                     InvokeWithoutArgs([idx = index, &timestamps] {
-                        timestamps[idx] =
-                            std::chrono::high_resolution_clock::now();
-                    }),
+                timestamps[idx] = std::chrono::high_resolution_clock::now();
+            }),
                     InvokeWithoutArgs(DbusEnvironment::setPromise("commit"))));
         }
 
diff --git a/tests/src/test_on_change_threshold.cpp b/tests/src/test_on_change_threshold.cpp
index b4a6fd3..0623a10 100644
--- a/tests/src/test_on_change_threshold.cpp
+++ b/tests/src/test_on_change_threshold.cpp
@@ -51,8 +51,8 @@
     {
         EXPECT_CALL(*sensor,
                     registerForUpdates(Truly([sut = sut.get()](const auto& x) {
-                        return x.lock().get() == sut;
-                    })));
+            return x.lock().get() == sut;
+        })));
     }
 
     sut->initialize();
diff --git a/tests/src/test_report.cpp b/tests/src/test_report.cpp
index accd112..31d49c5 100644
--- a/tests/src/test_report.cpp
+++ b/tests/src/test_report.cpp
@@ -199,7 +199,7 @@
         DbusEnvironment::getBus()->async_method_call(
             [&methodPromise](boost::system::error_code ec) {
             methodPromise.set_value(ec);
-            },
+        },
             DbusEnvironment::serviceName(), path, interface, method);
         return DbusEnvironment::waitForFuture(methodPromise.get_future());
     }
@@ -237,8 +237,8 @@
     EXPECT_THAT(
         getProperty<std::vector<std::string>>(sut->getPath(), "ReportActions"),
         Eq(utils::transform(defaultParams().reportActions(), [](const auto v) {
-            return utils::enumToString(v);
-        })));
+        return utils::enumToString(v);
+    })));
     EXPECT_THAT(getProperty<bool>(sut->getPath(), "EmitsReadingsUpdate"),
                 Eq(utils::contains(defaultParams().reportActions(),
                                    ReportAction::emitsReadingsUpdate)));
@@ -357,8 +357,8 @@
     EXPECT_THAT(
         getProperty<std::vector<std::string>>(sut->getPath(), "ReportActions"),
         Eq(utils::transform(defaultParams().reportActions(), [](const auto v) {
-            return utils::enumToString(v);
-        })));
+        return utils::enumToString(v);
+    })));
 }
 
 TEST_F(TestReport, createReportWithEmptyActions)
@@ -385,8 +385,8 @@
         ReportParams()
             .reportId("TestId_1")
             .reportActions(utils::transform(newActions, [](const auto& action) {
-                return utils::toReportAction(action);
-            })));
+        return utils::toReportAction(action);
+    })));
     EXPECT_THAT(
         getProperty<std::vector<std::string>>(sut->getPath(), "ReportActions"),
         Eq(expectedActions));
@@ -618,7 +618,7 @@
                                             defaultParams().reportActions(),
                                             [](const auto v) {
     return utils::toUnderlying(v);
-                                            }))),
+}))),
         std::make_pair("Interval",
                        nlohmann::json(defaultParams().interval().count())),
         std::make_pair("AppendLimit",
@@ -1116,8 +1116,8 @@
     {
         EXPECT_CALL(*metric, registerForUpdates(_))
             .WillOnce(Invoke([&args](const interfaces::MetricListener& report) {
-                args.emplace_back(&report);
-            }));
+            args.emplace_back(&report);
+        }));
         ;
     }
 
diff --git a/tests/src/test_report_manager.cpp b/tests/src/test_report_manager.cpp
index 295d966..83c0a1a 100644
--- a/tests/src/test_report_manager.cpp
+++ b/tests/src/test_report_manager.cpp
@@ -66,7 +66,7 @@
             [&addReportPromise](boost::system::error_code ec,
                                 const std::string& path) {
             addReportPromise.set_value({ec, path});
-            },
+        },
             DbusEnvironment::serviceName(), ReportManager::reportManagerPath,
             ReportManager::reportManagerIfaceName, "AddReport",
             std::forward<Args>(args)...);
diff --git a/tests/src/test_trigger.cpp b/tests/src/test_trigger.cpp
index 6cccb4a..3e5818a 100644
--- a/tests/src/test_trigger.cpp
+++ b/tests/src/test_trigger.cpp
@@ -141,7 +141,7 @@
         DbusEnvironment::getBus()->async_method_call(
             [&methodPromise](boost::system::error_code ec) {
             methodPromise.set_value(ec);
-            },
+        },
             DbusEnvironment::serviceName(), path, Trigger::deleteIfaceName,
             "Delete");
         return DbusEnvironment::waitForFuture(methodPromise.get_future());
@@ -155,10 +155,9 @@
     EXPECT_THAT(getProperty<bool>(sut->getPath(), "Persistent"), Eq(true));
     EXPECT_THAT(
         getProperty<std::vector<std::string>>(sut->getPath(), "TriggerActions"),
-        Eq(utils::transform(triggerParams.triggerActions(),
-                            [](const auto& action) {
-        return actionToString(action);
-        })));
+        Eq(utils::transform(
+            triggerParams.triggerActions(),
+            [](const auto& action) { return actionToString(action); })));
     EXPECT_THAT((getProperty<SensorsInfo>(sut->getPath(), "Sensors")),
                 Eq(utils::fromLabeledSensorsInfo(triggerParams.sensors())));
     EXPECT_THAT(
@@ -519,7 +518,7 @@
                 Eq(utils::transform(triggerParams.triggerActions(),
                                     [](const auto& action) {
         return actionToString(action);
-                })));
+    })));
 }
 
 TEST_F(TestTriggerStore, settingPersistencyToTrueStoresTriggerReportIds)
diff --git a/tests/src/test_trigger_manager.cpp b/tests/src/test_trigger_manager.cpp
index 03ec5ce..945c411 100644
--- a/tests/src/test_trigger_manager.cpp
+++ b/tests/src/test_trigger_manager.cpp
@@ -31,7 +31,7 @@
             [&addTriggerPromise](boost::system::error_code ec,
                                  const std::string& path) {
             addTriggerPromise.set_value({ec, path});
-            },
+        },
             DbusEnvironment::serviceName(), TriggerManager::triggerManagerPath,
             TriggerManager::triggerManagerIfaceName, "AddTrigger", params.id(),
             params.name(),
@@ -465,10 +465,10 @@
         {"Name", TriggerParams().name()},
         {"ThresholdParamsDiscriminator",
          TriggerParams().thresholdParams().index()},
-        {"TriggerActions",
-         utils::transform(
-             TriggerParams().triggerActions(),
-             [](const auto& action) { return actionToString(action); })},
+        {"TriggerActions", utils::transform(TriggerParams().triggerActions(),
+                                            [](const auto& action) {
+        return actionToString(action);
+    })},
         {"ThresholdParams", utils::labeledThresholdParamsToJson(
                                 TriggerParams().thresholdParams())},
         {"ReportIds", TriggerParams().reportIds()},
