diff --git a/test/ipmi_open_unittest.cpp b/test/ipmi_open_unittest.cpp
index b938cbe..cdd4dc3 100644
--- a/test/ipmi_open_unittest.cpp
+++ b/test/ipmi_open_unittest.cpp
@@ -77,9 +77,9 @@
 
     EXPECT_CALL(mgr, open(req.flags, StrEq(blobId), NotNull()))
         .WillOnce(Invoke([&](uint16_t, const std::string&, uint16_t* session) {
-            (*session) = returnedSession;
-            return true;
-        }));
+        (*session) = returnedSession;
+        return true;
+    }));
 
     auto result = validateReply(openBlob(&mgr, request));
 
diff --git a/test/ipmi_sessionstat_unittest.cpp b/test/ipmi_sessionstat_unittest.cpp
index 3278f25..56171f2 100644
--- a/test/ipmi_sessionstat_unittest.cpp
+++ b/test/ipmi_sessionstat_unittest.cpp
@@ -64,10 +64,10 @@
     EXPECT_CALL(mgr, stat(Matcher<uint16_t>(req.sessionId),
                           Matcher<BlobMeta*>(NotNull())))
         .WillOnce(Invoke([&](uint16_t, BlobMeta* meta) {
-            meta->blobState = blobState;
-            meta->size = size;
-            return true;
-        }));
+        meta->blobState = blobState;
+        meta->size = size;
+        return true;
+    }));
 
     auto result = validateReply(sessionStatBlob(&mgr, request));
 
@@ -105,9 +105,9 @@
     EXPECT_CALL(mgr, stat(Matcher<uint16_t>(req.sessionId),
                           Matcher<BlobMeta*>(NotNull())))
         .WillOnce(Invoke([&](uint16_t, BlobMeta* meta) {
-            (*meta) = lmeta;
-            return true;
-        }));
+        (*meta) = lmeta;
+        return true;
+    }));
 
     auto result = validateReply(sessionStatBlob(&mgr, request));
 
diff --git a/test/ipmi_stat_unittest.cpp b/test/ipmi_stat_unittest.cpp
index ab091ad..aab3a76 100644
--- a/test/ipmi_stat_unittest.cpp
+++ b/test/ipmi_stat_unittest.cpp
@@ -88,10 +88,10 @@
     EXPECT_CALL(mgr, stat(Matcher<const std::string&>(StrEq(blobId)),
                           Matcher<BlobMeta*>(NotNull())))
         .WillOnce(Invoke([&](const std::string&, BlobMeta* meta) {
-            meta->blobState = blobState;
-            meta->size = size;
-            return true;
-        }));
+        meta->blobState = blobState;
+        meta->size = size;
+        return true;
+    }));
 
     auto result = validateReply(statBlob(&mgr, request));
 
@@ -131,9 +131,9 @@
     EXPECT_CALL(mgr, stat(Matcher<const std::string&>(StrEq(blobId)),
                           Matcher<BlobMeta*>(NotNull())))
         .WillOnce(Invoke([&](const std::string&, BlobMeta* meta) {
-            (*meta) = lmeta;
-            return true;
-        }));
+        (*meta) = lmeta;
+        return true;
+    }));
 
     auto result = validateReply(statBlob(&mgr, request));
 
diff --git a/test/process_unittest.cpp b/test/process_unittest.cpp
index 9d0d06c..c4273c4 100644
--- a/test/process_unittest.cpp
+++ b/test/process_unittest.cpp
@@ -213,8 +213,8 @@
     std::vector<uint8_t> request(MAX_IPMI_BUFFER - 1);
     uint32_t payloadLen = sizeof(uint16_t) + sizeof(uint8_t);
 
-    IpmiBlobHandler h =
-        [payloadLen](ManagerInterface*, std::span<const uint8_t>) {
+    IpmiBlobHandler h = [payloadLen](ManagerInterface*,
+                                     std::span<const uint8_t>) {
         std::vector<uint8_t> output(payloadLen, 0);
         output[2] = 0x56;
         return ipmi::responseSuccess(output);
@@ -239,8 +239,8 @@
     std::vector<uint8_t> request(MAX_IPMI_BUFFER - 1);
     uint32_t payloadLen = sizeof(uint16_t) + sizeof(uint8_t);
 
-    IpmiBlobHandler h =
-        [payloadLen](ManagerInterface*, std::span<const uint8_t>) {
+    IpmiBlobHandler h = [payloadLen](ManagerInterface*,
+                                     std::span<const uint8_t>) {
         std::vector<uint8_t> output(payloadLen, 0);
         output[2] = 0x56;
         return ipmi::responseSuccess(output);
