diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..ea71ad6
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,99 @@
+---
+Language:        Cpp
+# BasedOnStyle:  LLVM
+AccessModifierOffset: -2
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignEscapedNewlinesLeft: false
+AlignOperands:   true
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: true
+BinPackArguments: true
+BinPackParameters: true
+BraceWrapping:
+  AfterClass:      true
+  AfterControlStatement: true
+  AfterEnum:       true
+  AfterFunction:   true
+  AfterNamespace:  true
+  AfterObjCDeclaration: true
+  AfterStruct:     true
+  AfterUnion:      true
+  BeforeCatch:     true
+  BeforeElse:      true
+  IndentBraces:    false
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Custom
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializers: AfterColon
+ColumnLimit:     80
+CommentPragmas:  '^ IWYU pragma:'
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DerivePointerAlignment: false
+PointerAlignment: Left
+DisableFormat:   false
+ExperimentalAutoDetectBinPacking: false
+FixNamespaceComments: true
+ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
+IncludeBlocks: Regroup
+IncludeCategories:
+  - Regex:           '^[<"](gtest|gmock)'
+    Priority:        5
+  - Regex:           '^"config.h"'
+    Priority:        -1
+  - Regex:           '^".*\.hpp"'
+    Priority:        1
+  - Regex:           '^<.*\.h>'
+    Priority:        2
+  - Regex:           '^<.*'
+    Priority:        3
+  - Regex:           '.*'
+    Priority:        4
+IndentCaseLabels: true
+IndentWidth:     4
+IndentWrappedFunctionNames: true
+KeepEmptyLinesAtTheStartOfBlocks: true
+MacroBlockBegin: ''
+MacroBlockEnd:   ''
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: None
+ObjCBlockIndentWidth: 2
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: true
+PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakComment: 300
+PenaltyBreakFirstLessLess: 120
+PenaltyBreakString: 1000
+PenaltyExcessCharacter: 1000000
+PenaltyReturnTypeOnItsOwnLine: 60
+ReflowComments:  true
+SortIncludes:    true
+SortUsingDeclarations: true
+SpaceAfterCStyleCast: false
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeParens: ControlStatements
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles:  false
+SpacesInContainerLiterals: true
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+Standard:        Cpp11
+TabWidth:        4
+UseTab:          Never
+...
+
diff --git a/elog-errors.hpp b/elog-errors.hpp
index 95c80e7..b9121c7 100644
--- a/elog-errors.hpp
+++ b/elog-errors.hpp
@@ -2,13 +2,12 @@
 // See elog-gen.py for more details
 #pragma once
 
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/log.hpp>
+#include <sdbusplus/exception.hpp>
 #include <string>
 #include <tuple>
 #include <type_traits>
-#include <sdbusplus/exception.hpp>
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog.hpp>
-
 
 namespace sdbusplus
 {
@@ -24,7 +23,7 @@
 {
 namespace Error
 {
-    struct InventoryPathError;
+struct InventoryPathError;
 } // namespace Error
 } // namespace Monitor
 } // namespace Fru
@@ -45,7 +44,7 @@
 {
 namespace Error
 {
-    struct ObjectNotFoundError;
+struct ObjectNotFoundError;
 } // namespace Error
 } // namespace Mapper
 } // namespace Led
@@ -65,7 +64,7 @@
 {
 namespace Error
 {
-    struct MethodError;
+struct MethodError;
 } // namespace Error
 } // namespace Mapper
 } // namespace Led
@@ -73,7 +72,6 @@
 } // namespace xyz
 } // namespace sdbusplus
 
-
 namespace phosphor
 {
 
@@ -97,16 +95,17 @@
 {
     static constexpr auto str = "PATH=%s";
     static constexpr auto str_short = "PATH";
-    using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
-    explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
+    using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
+    explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
     type _entry;
 };
 
-}  // namespace _InventoryPathError
+} // namespace _InventoryPathError
 
 struct InventoryPathError : public sdbusplus::exception_t
 {
-    static constexpr auto errName = "xyz.openbmc_project.Led.Fru.Monitor.InventoryPathError";
+    static constexpr auto errName =
+        "xyz.openbmc_project.Led.Fru.Monitor.InventoryPathError";
     static constexpr auto errDesc = "Invalid Inventory Path.";
     static constexpr auto L = level::INFO;
     using PATH = _InventoryPathError::PATH;
@@ -134,17 +133,17 @@
 } // namespace openbmc_project
 } // namespace xyz
 
-
 namespace details
 {
 
 template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Fru::Monitor::Error::InventoryPathError>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Fru::Monitor::
+                              Error::InventoryPathError>
 {
     using type = xyz::openbmc_project::Led::Fru::Monitor::InventoryPathError;
 };
 
-}
+} // namespace details
 
 namespace xyz
 {
@@ -161,32 +160,33 @@
 {
     static constexpr auto str = "METHOD_NAME=%s";
     static constexpr auto str_short = "METHOD_NAME";
-    using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
-    explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)) {};
+    using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
+    explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)){};
     type _entry;
 };
 struct PATH
 {
     static constexpr auto str = "PATH=%s";
     static constexpr auto str_short = "PATH";
-    using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
-    explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
+    using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
+    explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
     type _entry;
 };
 struct INTERFACE
 {
     static constexpr auto str = "INTERFACE=%s";
     static constexpr auto str_short = "INTERFACE";
-    using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
-    explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)) {};
+    using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
+    explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)){};
     type _entry;
 };
 
-}  // namespace _MethodError
+} // namespace _MethodError
 
 struct MethodError : public sdbusplus::exception_t
 {
-    static constexpr auto errName = "xyz.openbmc_project.Led.Mapper.MethodError";
+    static constexpr auto errName =
+        "xyz.openbmc_project.Led.Mapper.MethodError";
     static constexpr auto errDesc = "Failed to invoke ObjectMapper method";
     static constexpr auto L = level::INFO;
     using METHOD_NAME = _MethodError::METHOD_NAME;
@@ -215,17 +215,17 @@
 } // namespace openbmc_project
 } // namespace xyz
 
-
 namespace details
 {
 
 template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Mapper::Error::MethodError>
+struct map_exception_type<
+    sdbusplus::xyz::openbmc_project::Led::Mapper::Error::MethodError>
 {
     using type = xyz::openbmc_project::Led::Mapper::MethodError;
 };
 
-}
+} // namespace details
 
 namespace xyz
 {
@@ -242,32 +242,33 @@
 {
     static constexpr auto str = "METHOD_NAME=%s";
     static constexpr auto str_short = "METHOD_NAME";
-    using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
-    explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)) {};
+    using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
+    explicit constexpr METHOD_NAME(const char* a) : _entry(entry(str, a)){};
     type _entry;
 };
 struct PATH
 {
     static constexpr auto str = "PATH=%s";
     static constexpr auto str_short = "PATH";
-    using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
-    explicit constexpr PATH(const char* a) : _entry(entry(str, a)) {};
+    using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
+    explicit constexpr PATH(const char* a) : _entry(entry(str, a)){};
     type _entry;
 };
 struct INTERFACE
 {
     static constexpr auto str = "INTERFACE=%s";
     static constexpr auto str_short = "INTERFACE";
-    using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
-    explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)) {};
+    using type = std::tuple<std::decay_t<decltype(str)>, const char*>;
+    explicit constexpr INTERFACE(const char* a) : _entry(entry(str, a)){};
     type _entry;
 };
 
-}  // namespace _ObjectNotFoundError
+} // namespace _ObjectNotFoundError
 
 struct ObjectNotFoundError : public sdbusplus::exception_t
 {
-    static constexpr auto errName = "xyz.openbmc_project.Led.Mapper.ObjectNotFoundError";
+    static constexpr auto errName =
+        "xyz.openbmc_project.Led.Mapper.ObjectNotFoundError";
     static constexpr auto errDesc = "Failed to get response from the method.";
     static constexpr auto L = level::INFO;
     using METHOD_NAME = _ObjectNotFoundError::METHOD_NAME;
@@ -296,18 +297,17 @@
 } // namespace openbmc_project
 } // namespace xyz
 
-
 namespace details
 {
 
 template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Led::Mapper::Error::ObjectNotFoundError>
+struct map_exception_type<
+    sdbusplus::xyz::openbmc_project::Led::Mapper::Error::ObjectNotFoundError>
 {
     using type = xyz::openbmc_project::Led::Mapper::ObjectNotFoundError;
 };
 
-}
-
+} // namespace details
 
 } // namespace logging
 
diff --git a/fault-monitor/fru-fault-monitor.cpp b/fault-monitor/fru-fault-monitor.cpp
index aecb481..a7ed952 100644
--- a/fault-monitor/fru-fault-monitor.cpp
+++ b/fault-monitor/fru-fault-monitor.cpp
@@ -1,9 +1,11 @@
-#include <phosphor-logging/elog.hpp>
-#include <sdbusplus/exception.hpp>
+#include "fru-fault-monitor.hpp"
+
+#include "elog-errors.hpp"
 #include "xyz/openbmc_project/Led/Fru/Monitor/error.hpp"
 #include "xyz/openbmc_project/Led/Mapper/error.hpp"
-#include "elog-errors.hpp"
-#include "fru-fault-monitor.hpp"
+
+#include <phosphor-logging/elog.hpp>
+#include <sdbusplus/exception.hpp>
 
 namespace phosphor
 {
@@ -18,17 +20,17 @@
 
 using namespace phosphor::logging;
 
-constexpr auto MAPPER_BUSNAME   = "xyz.openbmc_project.ObjectMapper";
-constexpr auto MAPPER_OBJ_PATH  = "/xyz/openbmc_project/object_mapper";
-constexpr auto MAPPER_IFACE     = "xyz.openbmc_project.ObjectMapper";
-constexpr auto OBJMGR_IFACE     = "org.freedesktop.DBus.ObjectManager";
-constexpr auto LED_GROUPS       = "/xyz/openbmc_project/led/groups/";
-constexpr auto LOG_PATH         = "/xyz/openbmc_project/logging";
-constexpr auto LOG_IFACE        = "xyz.openbmc_project.Logging.Entry";
+constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper";
+constexpr auto MAPPER_OBJ_PATH = "/xyz/openbmc_project/object_mapper";
+constexpr auto MAPPER_IFACE = "xyz.openbmc_project.ObjectMapper";
+constexpr auto OBJMGR_IFACE = "org.freedesktop.DBus.ObjectManager";
+constexpr auto LED_GROUPS = "/xyz/openbmc_project/led/groups/";
+constexpr auto LOG_PATH = "/xyz/openbmc_project/logging";
+constexpr auto LOG_IFACE = "xyz.openbmc_project.Logging.Entry";
 
-using AssociationList = std::vector<std::tuple<
-                        std::string, std::string, std::string>>;
-using Attributes = sdbusplus::message::variant<bool,AssociationList>;
+using AssociationList =
+    std::vector<std::tuple<std::string, std::string, std::string>>;
+using Attributes = sdbusplus::message::variant<bool, AssociationList>;
 using PropertyName = std::string;
 using PropertyMap = std::map<PropertyName, Attributes>;
 using InterfaceName = std::string;
@@ -40,30 +42,25 @@
 using Interfaces = std::vector<Interface>;
 using MapperResponseType = std::map<Path, std::map<Service, Interfaces>>;
 
-using MethodErr  =
+using MethodErr =
     sdbusplus::xyz::openbmc_project::Led::Mapper::Error::MethodError;
 using ObjectNotFoundErr =
     sdbusplus::xyz::openbmc_project::Led::Mapper::Error::ObjectNotFoundError;
-using InventoryPathErr =
-    sdbusplus::xyz::openbmc_project::
-    Led::Fru::Monitor::Error::InventoryPathError;
+using InventoryPathErr = sdbusplus::xyz::openbmc_project::Led::Fru::Monitor::
+    Error::InventoryPathError;
 
-std::string getService(sdbusplus::bus::bus& bus,
-                       const std::string& path)
+std::string getService(sdbusplus::bus::bus& bus, const std::string& path)
 {
-    auto mapper = bus.new_method_call(MAPPER_BUSNAME,
-                                      MAPPER_OBJ_PATH,
+    auto mapper = bus.new_method_call(MAPPER_BUSNAME, MAPPER_OBJ_PATH,
                                       MAPPER_IFACE, "GetObject");
     mapper.append(path.c_str(), std::vector<std::string>({OBJMGR_IFACE}));
     auto mapperResponseMsg = bus.call(mapper);
     if (mapperResponseMsg.is_method_error())
     {
         using namespace xyz::openbmc_project::Led::Mapper;
-        elog<MethodErr>(
-            MethodError::METHOD_NAME("GetObject"),
-            MethodError::PATH(path.c_str()),
-            MethodError::INTERFACE(
-                OBJMGR_IFACE));
+        elog<MethodErr>(MethodError::METHOD_NAME("GetObject"),
+                        MethodError::PATH(path.c_str()),
+                        MethodError::INTERFACE(OBJMGR_IFACE));
     }
 
     std::map<std::string, std::vector<std::string>> mapperResponse;
@@ -73,32 +70,27 @@
     }
     catch (const sdbusplus::exception::SdBusError& e)
     {
-        log<level::ERR>("Failed to parse getService mapper response",
-                        entry("ERROR=%s", e.what()),
-                        entry("REPLY_SIG=%s", mapperResponseMsg.get_signature()));
+        log<level::ERR>(
+            "Failed to parse getService mapper response",
+            entry("ERROR=%s", e.what()),
+            entry("REPLY_SIG=%s", mapperResponseMsg.get_signature()));
         using namespace xyz::openbmc_project::Led::Mapper;
-        elog<ObjectNotFoundErr>(
-            ObjectNotFoundError::METHOD_NAME("GetObject"),
-            ObjectNotFoundError::PATH(path.c_str()),
-            ObjectNotFoundError::INTERFACE(
-                OBJMGR_IFACE));
+        elog<ObjectNotFoundErr>(ObjectNotFoundError::METHOD_NAME("GetObject"),
+                                ObjectNotFoundError::PATH(path.c_str()),
+                                ObjectNotFoundError::INTERFACE(OBJMGR_IFACE));
     }
     if (mapperResponse.empty())
     {
         using namespace xyz::openbmc_project::Led::Mapper;
-        elog<ObjectNotFoundErr>(
-            ObjectNotFoundError::METHOD_NAME("GetObject"),
-            ObjectNotFoundError::PATH(path.c_str()),
-            ObjectNotFoundError::INTERFACE(
-                OBJMGR_IFACE));
+        elog<ObjectNotFoundErr>(ObjectNotFoundError::METHOD_NAME("GetObject"),
+                                ObjectNotFoundError::PATH(path.c_str()),
+                                ObjectNotFoundError::INTERFACE(OBJMGR_IFACE));
     }
 
     return mapperResponse.cbegin()->first;
 }
 
-void action(sdbusplus::bus::bus& bus,
-            const std::string& path,
-            bool assert)
+void action(sdbusplus::bus::bus& bus, const std::string& path, bool assert)
 {
     std::string service;
     try
@@ -122,20 +114,15 @@
     if (pos == std::string::npos)
     {
         using namespace xyz::openbmc_project::Led::Fru::Monitor;
-        report<InventoryPathErr>(
-            InventoryPathError::PATH(
-                path.c_str()));
+        report<InventoryPathErr>(InventoryPathError::PATH(path.c_str()));
         return;
     }
     auto unit = path.substr(pos + 1);
 
-    std::string ledPath = LED_GROUPS +
-                          unit + '_' + LED_FAULT;
+    std::string ledPath = LED_GROUPS + unit + '_' + LED_FAULT;
 
-    auto method =  bus.new_method_call(service.c_str(),
-                                       ledPath.c_str(),
-                                       "org.freedesktop.DBus.Properties",
-                                       "Set");
+    auto method = bus.new_method_call(service.c_str(), ledPath.c_str(),
+                                      "org.freedesktop.DBus.Properties", "Set");
     method.append("xyz.openbmc_project.Led.Group");
     method.append("Asserted");
 
@@ -176,7 +163,7 @@
     std::size_t found = objectPath.str.find(ELOG_ENTRY);
     if (found == std::string::npos)
     {
-        //Not a new error entry skip
+        // Not a new error entry skip
         return;
     }
     auto iter = interfaces.find("org.openbmc.Associations");
@@ -185,8 +172,8 @@
         return;
     }
 
-    //Nothing else shows when a specific error log
-    //has been created. Do it here.
+    // Nothing else shows when a specific error log
+    // has been created. Do it here.
     std::string message{objectPath.str + " created"};
     log<level::INFO>(message.c_str());
 
@@ -200,7 +187,7 @@
         sdbusplus::message::variant_ns::get<AssociationList>(attr->second);
     if (assocs.empty())
     {
-        //No associations skip
+        // No associations skip
         return;
     }
 
@@ -220,10 +207,8 @@
 void getLoggingSubTree(sdbusplus::bus::bus& bus, MapperResponseType& subtree)
 {
     auto depth = 0;
-    auto mapperCall = bus.new_method_call(MAPPER_BUSNAME,
-                                          MAPPER_OBJ_PATH,
-                                          MAPPER_IFACE,
-                                          "GetSubTree");
+    auto mapperCall = bus.new_method_call(MAPPER_BUSNAME, MAPPER_OBJ_PATH,
+                                          MAPPER_IFACE, "GetSubTree");
     mapperCall.append("/");
     mapperCall.append(depth);
     mapperCall.append(std::vector<Interface>({LOG_IFACE}));
@@ -234,10 +219,9 @@
         if (mapperResponseMsg.is_method_error())
         {
             using namespace xyz::openbmc_project::Led::Mapper;
-            report<MethodErr>(
-                    MethodError::METHOD_NAME("GetSubTree"),
-                    MethodError::PATH(MAPPER_OBJ_PATH),
-                    MethodError::INTERFACE(OBJMGR_IFACE));
+            report<MethodErr>(MethodError::METHOD_NAME("GetSubTree"),
+                              MethodError::PATH(MAPPER_OBJ_PATH),
+                              MethodError::INTERFACE(OBJMGR_IFACE));
             return;
         }
 
@@ -247,9 +231,10 @@
         }
         catch (const sdbusplus::exception::SdBusError& e)
         {
-            log<level::ERR>("Failed to parse existing callouts subtree message",
-                    entry("ERROR=%s", e.what()),
-                    entry("REPLY_SIG=%s", mapperResponseMsg.get_signature()));
+            log<level::ERR>(
+                "Failed to parse existing callouts subtree message",
+                entry("ERROR=%s", e.what()),
+                entry("REPLY_SIG=%s", mapperResponseMsg.get_signature()));
         }
     }
     catch (const sdbusplus::exception::SdBusError& e)
@@ -260,27 +245,26 @@
 
 void Add::processExistingCallouts(sdbusplus::bus::bus& bus)
 {
-    MapperResponseType  mapperResponse;
+    MapperResponseType mapperResponse;
 
     getLoggingSubTree(bus, mapperResponse);
     if (mapperResponse.empty())
     {
-        //No errors to process.
+        // No errors to process.
         return;
     }
 
     for (const auto& elem : mapperResponse)
     {
-        auto method =  bus.new_method_call(elem.second.begin()->first.c_str(),
-                                           elem.first.c_str(),
-                                           "org.freedesktop.DBus.Properties",
-                                           "Get");
+        auto method = bus.new_method_call(
+            elem.second.begin()->first.c_str(), elem.first.c_str(),
+            "org.freedesktop.DBus.Properties", "Get");
         method.append("org.openbmc.Associations");
         method.append("associations");
         auto reply = bus.call(method);
         if (reply.is_method_error())
         {
-            //do not stop, continue with next elog
+            // do not stop, continue with next elog
             log<level::ERR>("Error in getting associations");
             continue;
         }
@@ -292,15 +276,16 @@
         }
         catch (const sdbusplus::exception::SdBusError& e)
         {
-            log<level::ERR>("Failed to parse existing callouts associations message",
-                            entry("ERROR=%s", e.what()),
-                            entry("REPLY_SIG=%s", reply.get_signature()));
+            log<level::ERR>(
+                "Failed to parse existing callouts associations message",
+                entry("ERROR=%s", e.what()),
+                entry("REPLY_SIG=%s", reply.get_signature()));
             continue;
         }
         auto& assocs = assoc.get<AssociationList>();
         if (assocs.empty())
         {
-            //no associations, skip
+            // no associations, skip
             continue;
         }
 
@@ -324,8 +309,8 @@
     return;
 }
 
-}//namespace monitor
-}//namespace fault
-}//namespace fru
-}//namespace led
-}//namespace phosphor
+} // namespace monitor
+} // namespace fault
+} // namespace fru
+} // namespace led
+} // namespace phosphor
diff --git a/fault-monitor/fru-fault-monitor.hpp b/fault-monitor/fru-fault-monitor.hpp
index 77d3be2..54eb655 100644
--- a/fault-monitor/fru-fault-monitor.hpp
+++ b/fault-monitor/fru-fault-monitor.hpp
@@ -1,8 +1,9 @@
 #pragma once
 
+#include "config.h"
+
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server.hpp>
-#include "config.h"
 
 namespace phosphor
 {
@@ -16,13 +17,11 @@
 {
 
 /** @brief Assert or deassert an LED based on the input FRU
-  *  @param[in] bus       -  The Dbus bus object
-  *  @param[in] path      -  Inventory path of the FRU
-  *  @param[in] assert    -  Assert if true deassert if false
-  */
-void action(sdbusplus::bus::bus& bus,
-            const std::string& path,
-            bool assert);
+ *  @param[in] bus       -  The Dbus bus object
+ *  @param[in] path      -  Inventory path of the FRU
+ *  @param[in] assert    -  Assert if true deassert if false
+ */
+void action(sdbusplus::bus::bus& bus, const std::string& path, bool assert);
 
 class Remove;
 
@@ -33,44 +32,43 @@
  */
 class Add
 {
-    public:
-        Add() = delete;
-        ~Add() = default;
-        Add(const Add&) = delete;
-        Add& operator=(const Add&) = delete;
-        Add(Add&&) = default;
-        Add& operator=(Add&&) = default;
+  public:
+    Add() = delete;
+    ~Add() = default;
+    Add(const Add&) = delete;
+    Add& operator=(const Add&) = delete;
+    Add(Add&&) = default;
+    Add& operator=(Add&&) = default;
 
-        /** @brief constructs Add a watch for FRU faults.
-         *  @param[in] bus -  The Dbus bus object
-         */
-        Add(sdbusplus::bus::bus& bus):
-            matchCreated(
-                bus,
-                sdbusplus::bus::match::rules::interfacesAdded() +
+    /** @brief constructs Add a watch for FRU faults.
+     *  @param[in] bus -  The Dbus bus object
+     */
+    Add(sdbusplus::bus::bus& bus) :
+        matchCreated(
+            bus,
+            sdbusplus::bus::match::rules::interfacesAdded() +
                 sdbusplus::bus::match::rules::path_namespace(
-                        "/xyz/openbmc_project/logging"),
-                std::bind(std::mem_fn(&Add::created),
-                          this, std::placeholders::_1))
-        {
-            processExistingCallouts(bus);
-        }
-    private:
+                    "/xyz/openbmc_project/logging"),
+            std::bind(std::mem_fn(&Add::created), this, std::placeholders::_1))
+    {
+        processExistingCallouts(bus);
+    }
 
-        /** @brief sdbusplus signal match for fault created */
-        sdbusplus::bus::match_t matchCreated;
+  private:
+    /** @brief sdbusplus signal match for fault created */
+    sdbusplus::bus::match_t matchCreated;
 
-        std::vector<std::unique_ptr<Remove>> removeWatches;
+    std::vector<std::unique_ptr<Remove>> removeWatches;
 
-        /** @brief Callback function for fru fault created
-         *  @param[in] msg       - Data associated with subscribed signal
-         */
-        void created(sdbusplus::message::message& msg);
+    /** @brief Callback function for fru fault created
+     *  @param[in] msg       - Data associated with subscribed signal
+     */
+    void created(sdbusplus::message::message& msg);
 
-        /** @brief This function process all callouts at application start
-         *  @param[in] bus - The Dbus bus object
-         */
-        void processExistingCallouts(sdbusplus::bus::bus& bus);
+    /** @brief This function process all callouts at application start
+     *  @param[in] bus - The Dbus bus object
+     */
+    void processExistingCallouts(sdbusplus::bus::bus& bus);
 };
 
 /** @class Remove
@@ -80,59 +78,55 @@
  */
 class Remove
 {
-    public:
-        Remove() = delete;
-        ~Remove() = default;
-        Remove(const Remove&) = delete;
-        Remove& operator=(const Remove&) = delete;
-        Remove(Remove&&) = default;
-        Remove& operator=(Remove&&) = default;
+  public:
+    Remove() = delete;
+    ~Remove() = default;
+    Remove(const Remove&) = delete;
+    Remove& operator=(const Remove&) = delete;
+    Remove(Remove&&) = default;
+    Remove& operator=(Remove&&) = default;
 
-        /** @brief constructs Remove
-         *  @param[in] bus  -  The Dbus bus object
-         *  @param[in] path -  Inventory path to fru
-         */
-        Remove(sdbusplus::bus::bus& bus, const std::string& path):
-            inventoryPath(path),
-            matchRemoved(
-                bus,
-                match(path),
-                std::bind(std::mem_fn(&Remove::removed),
-                          this, std::placeholders::_1))
-        {
-            //Do nothing
-        }
+    /** @brief constructs Remove
+     *  @param[in] bus  -  The Dbus bus object
+     *  @param[in] path -  Inventory path to fru
+     */
+    Remove(sdbusplus::bus::bus& bus, const std::string& path) :
+        inventoryPath(path),
+        matchRemoved(bus, match(path),
+                     std::bind(std::mem_fn(&Remove::removed), this,
+                               std::placeholders::_1))
+    {
+        // Do nothing
+    }
 
-    private:
+  private:
+    /** @brief inventory path of the FRU */
+    std::string inventoryPath;
 
-        /** @brief inventory path of the FRU */
-        std::string inventoryPath;
+    /** @brief sdbusplus signal matches for fault removed */
+    sdbusplus::bus::match_t matchRemoved;
 
-        /** @brief sdbusplus signal matches for fault removed */
-        sdbusplus::bus::match_t matchRemoved;
+    /** @brief Callback function for fru fault created
+     *  @param[in] msg       - Data associated with subscribed signal
+     */
+    void removed(sdbusplus::message::message& msg);
 
-        /** @brief Callback function for fru fault created
-         *  @param[in] msg       - Data associated with subscribed signal
-         */
-        void removed(sdbusplus::message::message& msg);
+    /** @brief function to create fault remove match for a fru
+     *  @param[in] path  - Inventory path of the faulty unit.
+     */
+    std::string match(const std::string& path)
+    {
+        namespace MatchRules = sdbusplus::bus::match::rules;
 
-        /** @brief function to create fault remove match for a fru
-         *  @param[in] path  - Inventory path of the faulty unit.
-         */
-        std::string match(const std::string& path)
-        {
-            namespace MatchRules = sdbusplus::bus::match::rules;
+        std::string matchStmt =
+            MatchRules::interfacesRemoved() +
+            MatchRules::argNpath(0, path + "/" + CALLOUT_REV_ASSOCIATION);
 
-            std::string matchStmt =
-                    MatchRules::interfacesRemoved() +
-                    MatchRules::argNpath(
-                            0, path + "/" + CALLOUT_REV_ASSOCIATION);
-
-            return matchStmt;
-        }
+        return matchStmt;
+    }
 };
-}//namespace monitor
-}//namespace fault
-}//namespace fru
-}//namespace led
-}//namespace phosphor
+} // namespace monitor
+} // namespace fault
+} // namespace fru
+} // namespace led
+} // namespace phosphor
diff --git a/group.cpp b/group.cpp
index 6c0f06a..0d4fa10 100644
--- a/group.cpp
+++ b/group.cpp
@@ -1,5 +1,6 @@
-#include <sdbusplus/message.hpp>
 #include "group.hpp"
+
+#include <sdbusplus/message.hpp>
 namespace phosphor
 {
 namespace led
@@ -9,14 +10,13 @@
 bool Group::asserted(bool value)
 {
     // Introducing these to enable gtest.
-    Manager::group ledsAssert {};
-    Manager::group ledsDeAssert {};
+    Manager::group ledsAssert{};
+    Manager::group ledsDeAssert{};
 
     // Group management is handled by Manager. The populated leds* sets are not
     // really used by production code. They are there to enable gtest for
     // validation.
-    auto result = manager.setGroupState(path, value, ledsAssert,
-                                        ledsDeAssert);
+    auto result = manager.setGroupState(path, value, ledsAssert, ledsDeAssert);
 
     // If something does not go right here, then there should be an sdbusplus
     // exception thrown.
@@ -24,8 +24,8 @@
 
     // Set the base class's asserted to 'true' since the getter
     // operation is handled there.
-    return sdbusplus::xyz::openbmc_project::Led::server::
-                      Group::asserted(result);
+    return sdbusplus::xyz::openbmc_project::Led::server::Group::asserted(
+        result);
 }
 
 } // namespace led
diff --git a/group.hpp b/group.hpp
index 34f7afd..4e0a283 100644
--- a/group.hpp
+++ b/group.hpp
@@ -1,9 +1,10 @@
 #pragma once
 
+#include "manager.hpp"
+
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
 #include <xyz/openbmc_project/Led/Group/server.hpp>
-#include "manager.hpp"
 namespace phosphor
 {
 namespace led
@@ -13,48 +14,46 @@
  *  @brief Manages group of LEDs and applies action on the elements of group
  */
 class Group : sdbusplus::server::object::object<
-              sdbusplus::xyz::openbmc_project::Led::server::Group>
+                  sdbusplus::xyz::openbmc_project::Led::server::Group>
 {
-    public:
-        Group() = delete;
-        ~Group() = default;
-        Group(const Group&) = delete;
-        Group& operator=(const Group&) = delete;
-        Group(Group&&) = default;
-        Group& operator=(Group&&) = default;
+  public:
+    Group() = delete;
+    ~Group() = default;
+    Group(const Group&) = delete;
+    Group& operator=(const Group&) = delete;
+    Group(Group&&) = default;
+    Group& operator=(Group&&) = default;
 
-        /** @brief Constructs LED Group
-         *
-         * @param[in] bus     - Handle to system dbus
-         * @param[in] objPath - The Dbus path that hosts LED group
-         * @param[in] manager - Reference to Manager
-         */
-        Group(sdbusplus::bus::bus& bus,
-              const std::string& objPath,
-              Manager& manager) :
+    /** @brief Constructs LED Group
+     *
+     * @param[in] bus     - Handle to system dbus
+     * @param[in] objPath - The Dbus path that hosts LED group
+     * @param[in] manager - Reference to Manager
+     */
+    Group(sdbusplus::bus::bus& bus, const std::string& objPath,
+          Manager& manager) :
 
-            sdbusplus::server::object::object<
+        sdbusplus::server::object::object<
             sdbusplus::xyz::openbmc_project::Led::server::Group>(
-                    bus, objPath.c_str()),
-            path(objPath),
-            manager(manager)
-        {
-            // Nothing to do here
-        }
+            bus, objPath.c_str()),
+        path(objPath), manager(manager)
+    {
+        // Nothing to do here
+    }
 
-        /** @brief Property SET Override function
-         *
-         *  @param[in]  value   -  True or False
-         *  @return             -  Success or exception thrown
-         */
-        bool asserted(bool value) override;
+    /** @brief Property SET Override function
+     *
+     *  @param[in]  value   -  True or False
+     *  @return             -  Success or exception thrown
+     */
+    bool asserted(bool value) override;
 
-    private:
-        /** @brief Path of the group instance */
-        std::string path;
+  private:
+    /** @brief Path of the group instance */
+    std::string path;
 
-        /** @brief Reference to Manager object */
-        Manager& manager;
+    /** @brief Reference to Manager object */
+    Manager& manager;
 };
 
 } // namespace led
diff --git a/led-main.cpp b/led-main.cpp
index 4df1a6a..cc0e6cf 100644
--- a/led-main.cpp
+++ b/led-main.cpp
@@ -1,9 +1,11 @@
-#include <iostream>
+#include "config.h"
+
+#include "group.hpp"
+#include "led-gen.hpp"
 #include "ledlayout.hpp"
 #include "manager.hpp"
-#include "group.hpp"
-#include "config.h"
-#include "led-gen.hpp"
+
+#include <iostream>
 
 int main(void)
 {
@@ -20,17 +22,17 @@
     std::vector<std::unique_ptr<phosphor::led::Group>> groups;
 
     /** Now create so many dbus objects as there are groups */
-    for (auto &grp: systemLedMap)
+    for (auto& grp : systemLedMap)
     {
-        groups.emplace_back(std::make_unique<phosphor::led::Group>(
-                    bus, grp.first, manager));
+        groups.emplace_back(
+            std::make_unique<phosphor::led::Group>(bus, grp.first, manager));
     }
 
     /** @brief Claim the bus */
     bus.request_name(BUSNAME);
 
     /** @brief Wait for client requests */
-    while(true)
+    while (true)
     {
         /** @brief process dbus calls / signals discarding unhandled */
         bus.process_discard();
diff --git a/ledlayout.hpp b/ledlayout.hpp
index 75c2d20..90b333c 100644
--- a/ledlayout.hpp
+++ b/ledlayout.hpp
@@ -12,46 +12,46 @@
  */
 namespace Layout
 {
-    /** @brief Define possible actions on a given LED.
-     *  For the BLINK operation, follow 50-50 duty cycle
-     */
-    enum Action
-    {
-        Off,
-        On,
-        Blink,
-    };
+/** @brief Define possible actions on a given LED.
+ *  For the BLINK operation, follow 50-50 duty cycle
+ */
+enum Action
+{
+    Off,
+    On,
+    Blink,
+};
 
-    /** @brief Name of the LED and it's proposed action.
-     *  This structure is supplied as configuration at build time
-     */
-    struct LedAction
-    {
-        std::string name;
-        Action action;
-        uint8_t dutyOn;
-        uint16_t period;
-        Action priority;
+/** @brief Name of the LED and it's proposed action.
+ *  This structure is supplied as configuration at build time
+ */
+struct LedAction
+{
+    std::string name;
+    Action action;
+    uint8_t dutyOn;
+    uint16_t period;
+    Action priority;
 
-        // Order LEDs such that same LEDs are grouped next to
-        // each other and the same LEDs are in priority order
-        // with the highest priority coming first
-        bool operator<(const LedAction& right) const
+    // Order LEDs such that same LEDs are grouped next to
+    // each other and the same LEDs are in priority order
+    // with the highest priority coming first
+    bool operator<(const LedAction& right) const
+    {
+        if (name == right.name)
         {
-            if (name == right.name)
+            if (action == right.action)
             {
-                if (action == right.action)
-                {
-                    return false;
-                }
-                else if (action == priority)
-                {
-                    return true;
-                }
+                return false;
             }
-            return name < right.name;
+            else if (action == priority)
+            {
+                return true;
+            }
         }
-    };
+        return name < right.name;
+    }
+};
 } // namespace Layout
 } // namespace led
 } // namespace phosphor
diff --git a/manager.cpp b/manager.cpp
index 28e6815..0235b7b 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -1,10 +1,11 @@
-#include <iostream>
-#include <string>
+#include "manager.hpp"
+
 #include <algorithm>
+#include <iostream>
 #include <phosphor-logging/log.hpp>
 #include <sdbusplus/exception.hpp>
+#include <string>
 #include <xyz/openbmc_project/Led/Physical/server.hpp>
-#include "manager.hpp"
 namespace phosphor
 {
 namespace led
@@ -28,41 +29,40 @@
     }
 
     // This will contain the union of what's already in the asserted group
-    group desiredState {};
-    for(const auto& grp : assertedGroups)
+    group desiredState{};
+    for (const auto& grp : assertedGroups)
     {
         desiredState.insert(grp->cbegin(), grp->cend());
     }
 
     // Find difference between Combined and Desired to identify
     // which LEDs are getting altered
-    group transient {};
+    group transient{};
     std::set_difference(combinedState.begin(), combinedState.end(),
                         desiredState.begin(), desiredState.end(),
-                        std::inserter(transient, transient.begin()),
-                        ledComp);
-    if(transient.size())
+                        std::inserter(transient, transient.begin()), ledComp);
+    if (transient.size())
     {
         // Find common LEDs between transient and Desired to know if some LEDs
         // are changing state and not really getting DeAsserted
-        group ledsTransient {};
-        std::set_intersection(transient.begin(),transient.end(),
-                            desiredState.begin(), desiredState.end(),
-                            std::inserter(ledsTransient, ledsTransient.begin()),
-                            ledLess);
+        group ledsTransient{};
+        std::set_intersection(
+            transient.begin(), transient.end(), desiredState.begin(),
+            desiredState.end(),
+            std::inserter(ledsTransient, ledsTransient.begin()), ledLess);
 
         // Find difference between above 2 to identify those LEDs which are
         // really getting DeAsserted
-        std::set_difference(transient.begin(),transient.end(),
-                            ledsTransient.begin(),ledsTransient.end(),
+        std::set_difference(transient.begin(), transient.end(),
+                            ledsTransient.begin(), ledsTransient.end(),
                             std::inserter(ledsDeAssert, ledsDeAssert.begin()),
                             ledLess);
 
         // Remove the elements from Current that are being DeAsserted.
-        if(ledsDeAssert.size())
+        if (ledsDeAssert.size())
         {
             // Power off LEDs that are to be really DeAsserted
-            for (auto& it:ledsDeAssert)
+            for (auto& it : ledsDeAssert)
             {
                 // Update LEDs in "physically asserted" set by removing those
                 // LEDs which are De-Asserted
@@ -77,18 +77,16 @@
 
     // Now LEDs that are to be Asserted. These could either be fresh asserts
     // -or- change between [On]<-->[Blink]
-    group temp {};
+    group temp{};
     std::unique_copy(desiredState.begin(), desiredState.end(),
-                     std::inserter(temp, temp.begin()),
-                     ledEqual);
-    if(temp.size())
+                     std::inserter(temp, temp.begin()), ledEqual);
+    if (temp.size())
     {
         // Find difference between [desired to be Asserted] and those LEDs
         // that are physically asserted currently.
-        std::set_difference(temp.begin(), temp.end(),
-                            currentState.begin(), currentState.end(),
-                            std::inserter(ledsAssert, ledsAssert.begin()),
-                            ledComp);
+        std::set_difference(
+            temp.begin(), temp.end(), currentState.begin(), currentState.end(),
+            std::inserter(ledsAssert, ledsAssert.begin()), ledComp);
     }
 
     // Update the current actual and desired(the virtual actual)
@@ -115,20 +113,22 @@
     // This order of LED operation is important.
     if (ledsDeAssert.size())
     {
-        for (const auto& it: ledsDeAssert)
+        for (const auto& it : ledsDeAssert)
         {
             std::string objPath = std::string(PHY_LED_PATH) + it.name;
-            log<level::DEBUG>("De-Asserting LED", entry("NAME=%s", it.name.c_str()));
+            log<level::DEBUG>("De-Asserting LED",
+                              entry("NAME=%s", it.name.c_str()));
             drivePhysicalLED(objPath, Layout::Action::Off, it.dutyOn);
         }
     }
 
-    if(ledsAssert.size())
+    if (ledsAssert.size())
     {
-        for (const auto& it: ledsAssert)
+        for (const auto& it : ledsAssert)
         {
             std::string objPath = std::string(PHY_LED_PATH) + it.name;
-            log<level::DEBUG>("Asserting LED", entry("NAME=%s", it.name.c_str()));
+            log<level::DEBUG>("Asserting LED",
+                              entry("NAME=%s", it.name.c_str()));
             drivePhysicalLED(objPath, it.action, it.dutyOn);
         }
     }
@@ -137,8 +137,7 @@
 
 // Calls into driving physical LED post choosing the action
 void Manager::drivePhysicalLED(const std::string& objPath,
-                               Layout::Action action,
-                               uint8_t dutyOn)
+                               Layout::Action action, uint8_t dutyOn)
 {
     using namespace phosphor::logging;
 
@@ -146,18 +145,18 @@
     if (service == phyLeds.end() || service->second.empty())
     {
         log<level::ERR>("No service providers for physical LED",
-                entry("PATH=%s",objPath.c_str()));
+                        entry("PATH=%s", objPath.c_str()));
         return;
     }
 
-   // If Blink, set its property
-   if (action == Layout::Action::Blink)
-   {
-       drivePhysicalLED(service->second, objPath, "DutyOn", dutyOn);
-   }
-   drivePhysicalLED(service->second, objPath, "State",
-           getPhysicalAction(action));
-   return;
+    // If Blink, set its property
+    if (action == Layout::Action::Blink)
+    {
+        drivePhysicalLED(service->second, objPath, "DutyOn", dutyOn);
+    }
+    drivePhysicalLED(service->second, objPath, "State",
+                     getPhysicalAction(action));
+    return;
 }
 
 /** @brief Returns action string based on enum */
@@ -168,11 +167,11 @@
     // TODO: openbmc/phosphor-led-manager#5
     //    Somehow need to use the generated Action enum than giving one
     //    in ledlayout.
-    if(action == Layout::Action::On)
+    if (action == Layout::Action::On)
     {
         return server::convertForMessage(server::Physical::Action::On);
     }
-    else if(action == Layout::Action::Blink)
+    else if (action == Layout::Action::Blink)
     {
         return server::convertForMessage(server::Physical::Action::Blink);
     }
@@ -188,9 +187,9 @@
     using namespace phosphor::logging;
 
     // Mapper dbus constructs
-    constexpr auto MAPPER_BUSNAME   = "xyz.openbmc_project.ObjectMapper";
-    constexpr auto MAPPER_OBJ_PATH  = "/xyz/openbmc_project/object_mapper";
-    constexpr auto MAPPER_IFACE     = "xyz.openbmc_project.ObjectMapper";
+    constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper";
+    constexpr auto MAPPER_OBJ_PATH = "/xyz/openbmc_project/object_mapper";
+    constexpr auto MAPPER_IFACE = "xyz.openbmc_project.ObjectMapper";
 
     // Needed to be passed to get the SubTree level
     auto depth = 0;
@@ -211,13 +210,13 @@
     {
         // Its okay if we do not see a corresponding physical LED.
         log<level::INFO>("Error looking up Physical LED services",
-                entry("PATH=%s",PHY_LED_PATH));
+                         entry("PATH=%s", PHY_LED_PATH));
         return;
     }
 
     // Response by mapper in the case of success
-    std::map<std::string, std::map<std::string,
-             std::vector<std::string>>> objectTree;
+    std::map<std::string, std::map<std::string, std::vector<std::string>>>
+        objectTree;
 
     // This is the dict of object paths - service names - interfaces
     try
@@ -234,7 +233,7 @@
     if (objectTree.empty())
     {
         log<level::INFO>("Physical LED lookup did not return any services",
-                entry("PATH=%s",PHY_LED_PATH));
+                         entry("PATH=%s", PHY_LED_PATH));
         return;
     }
 
diff --git a/manager.hpp b/manager.hpp
index c96a4bc..65f4c83 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -1,10 +1,11 @@
 #pragma once
 
-#include <map>
-#include <set>
-#include <sdbusplus/bus.hpp>
 #include "ledlayout.hpp"
 
+#include <map>
+#include <sdbusplus/bus.hpp>
+#include <set>
+
 namespace phosphor
 {
 namespace led
@@ -20,162 +21,158 @@
  */
 class Manager
 {
-    public:
-        /** @brief Only need the default Manager */
-        Manager() = delete;
-        ~Manager() = default;
-        Manager(const Manager&) = delete;
-        Manager& operator=(const Manager&) = delete;
-        Manager(Manager&&) = delete;
-        Manager& operator=(Manager&&) = delete;
+  public:
+    /** @brief Only need the default Manager */
+    Manager() = delete;
+    ~Manager() = default;
+    Manager(const Manager&) = delete;
+    Manager& operator=(const Manager&) = delete;
+    Manager(Manager&&) = delete;
+    Manager& operator=(Manager&&) = delete;
 
-        /** @brief Special comparator for finding set difference */
-        static bool ledComp(const phosphor::led::Layout::LedAction& left,
-                            const phosphor::led::Layout::LedAction& right)
+    /** @brief Special comparator for finding set difference */
+    static bool ledComp(const phosphor::led::Layout::LedAction& left,
+                        const phosphor::led::Layout::LedAction& right)
+    {
+        // Example :
+        // If FIRST_1 is {fan0, 1, 1} and FIRST_2 is {fan0, 2, 2},
+        // with default priority of Blink, this comparator would return
+        // false. But considering the priority, this comparator would need
+        // to return true so that we consider appropriate set and in
+        // this case its {fan0, 1, 1}
+        if (left.name == right.name)
         {
-            // Example :
-            // If FIRST_1 is {fan0, 1, 1} and FIRST_2 is {fan0, 2, 2},
-            // with default priority of Blink, this comparator would return
-            // false. But considering the priority, this comparator would need
-            // to return true so that we consider appropriate set and in
-            // this case its {fan0, 1, 1}
-            if (left.name == right.name)
+            if (left.action == right.action)
             {
-                if (left.action == right.action)
-                {
-                    return false;
-                }
-                else
-                {
-                    return true;
-                }
+                return false;
             }
-            return left.name < right.name;
+            else
+            {
+                return true;
+            }
         }
+        return left.name < right.name;
+    }
 
-        /** @brief Comparator for finding LEDs to be DeAsserted */
-        static bool ledLess(const phosphor::led::Layout::LedAction& left,
-                            const phosphor::led::Layout::LedAction& right)
-        {
-            return left.name < right.name;
-        }
+    /** @brief Comparator for finding LEDs to be DeAsserted */
+    static bool ledLess(const phosphor::led::Layout::LedAction& left,
+                        const phosphor::led::Layout::LedAction& right)
+    {
+        return left.name < right.name;
+    }
 
-        /** @brief Comparator for helping unique_copy */
-        static bool ledEqual(const phosphor::led::Layout::LedAction& left,
-                             const phosphor::led::Layout::LedAction& right)
-        {
-            return left.name == right.name;
-        }
+    /** @brief Comparator for helping unique_copy */
+    static bool ledEqual(const phosphor::led::Layout::LedAction& left,
+                         const phosphor::led::Layout::LedAction& right)
+    {
+        return left.name == right.name;
+    }
 
-        using group = std::set<phosphor::led::Layout::LedAction>;
-        using LedLayout = std::map<std::string, group>;
+    using group = std::set<phosphor::led::Layout::LedAction>;
+    using LedLayout = std::map<std::string, group>;
 
-        /** @brief static global map constructed at compile time */
-        const LedLayout& ledMap;
+    /** @brief static global map constructed at compile time */
+    const LedLayout& ledMap;
 
-        /** @brief Refer the user supplied LED layout and sdbusplus handler
-         *
-         *  @param [in] bus       - sdbusplus handler
-         *  @param [in] LedLayout - LEDs group layout
-         */
-        Manager(sdbusplus::bus::bus& bus,
-                const LedLayout& ledLayout)
-                : ledMap(ledLayout),
-                  bus(bus)
-        {
-            // Nothing here
-        }
+    /** @brief Refer the user supplied LED layout and sdbusplus handler
+     *
+     *  @param [in] bus       - sdbusplus handler
+     *  @param [in] LedLayout - LEDs group layout
+     */
+    Manager(sdbusplus::bus::bus& bus, const LedLayout& ledLayout) :
+        ledMap(ledLayout), bus(bus)
+    {
+        // Nothing here
+    }
 
-        /** @brief Given a group name, applies the action on the group
-         *
-         *  @param[in]  path          -  dbus path of group
-         *  @param[in]  assert        -  Could be true or false
-         *  @param[in]  ledsAssert    -  LEDs that are to be asserted new
-         *                               or to a different state
-         *  @param[in]  ledsDeAssert  -  LEDs that are to be Deasserted
-         *
-         *  @return                   -  Success or exception thrown
-         */
-        bool setGroupState(const std::string& path, bool assert,
-                           group& ledsAssert, group& ledsDeAssert);
+    /** @brief Given a group name, applies the action on the group
+     *
+     *  @param[in]  path          -  dbus path of group
+     *  @param[in]  assert        -  Could be true or false
+     *  @param[in]  ledsAssert    -  LEDs that are to be asserted new
+     *                               or to a different state
+     *  @param[in]  ledsDeAssert  -  LEDs that are to be Deasserted
+     *
+     *  @return                   -  Success or exception thrown
+     */
+    bool setGroupState(const std::string& path, bool assert, group& ledsAssert,
+                       group& ledsDeAssert);
 
-        /** @brief Finds the set of LEDs to operate on and executes action
-         *
-         *  @param[in]  ledsAssert    -  LEDs that are to be asserted newly
-         *                               or to a different state
-         *  @param[in]  ledsDeAssert  -  LEDs that are to be Deasserted
-         *
-         *  @return: None
-         */
-        void driveLEDs(group& ledsAssert, group& ledsDeAssert);
+    /** @brief Finds the set of LEDs to operate on and executes action
+     *
+     *  @param[in]  ledsAssert    -  LEDs that are to be asserted newly
+     *                               or to a different state
+     *  @param[in]  ledsDeAssert  -  LEDs that are to be Deasserted
+     *
+     *  @return: None
+     */
+    void driveLEDs(group& ledsAssert, group& ledsDeAssert);
 
-    private:
-        /** @brief sdbusplus handler */
-        sdbusplus::bus::bus& bus;
+  private:
+    /** @brief sdbusplus handler */
+    sdbusplus::bus::bus& bus;
 
-        /** Map of physical LED path to service name */
-        std::map<std::string, std::string> phyLeds {};
+    /** Map of physical LED path to service name */
+    std::map<std::string, std::string> phyLeds{};
 
-        /** @brief Pointers to groups that are in asserted state */
-        std::set<const group*> assertedGroups;
+    /** @brief Pointers to groups that are in asserted state */
+    std::set<const group*> assertedGroups;
 
-        /** @brief Contains the highest priority actions for all
-         *         asserted LEDs.
-         */
-        group currentState;
+    /** @brief Contains the highest priority actions for all
+     *         asserted LEDs.
+     */
+    group currentState;
 
-        /** @brief Contains the set of all actions for asserted LEDs */
-        group combinedState;
+    /** @brief Contains the set of all actions for asserted LEDs */
+    group combinedState;
 
-        /** @brief Returns action string based on enum
-         *
-         *  @param[in]  action - Action enum
-         *
-         *  @return string equivalent of the passed in enumeration
-         */
-        static std::string getPhysicalAction(Layout::Action action);
+    /** @brief Returns action string based on enum
+     *
+     *  @param[in]  action - Action enum
+     *
+     *  @return string equivalent of the passed in enumeration
+     */
+    static std::string getPhysicalAction(Layout::Action action);
 
-        /** @brief Chooses appropriate action to be triggered on physical LED
-         *  and calls into function that applies the actual action.
-         *
-         *  @param[in]  objPath   -  dbus object path
-         *  @param[in]  action    -  Intended action to be triggered
-         *  @param[in]  dutyOn    -  Duty Cycle ON percentage
-         */
-        void drivePhysicalLED(const std::string& objPath,
-                              Layout::Action action,
-                              uint8_t dutyOn);
+    /** @brief Chooses appropriate action to be triggered on physical LED
+     *  and calls into function that applies the actual action.
+     *
+     *  @param[in]  objPath   -  dbus object path
+     *  @param[in]  action    -  Intended action to be triggered
+     *  @param[in]  dutyOn    -  Duty Cycle ON percentage
+     */
+    void drivePhysicalLED(const std::string& objPath, Layout::Action action,
+                          uint8_t dutyOn);
 
-        /** @brief Makes a dbus call to a passed in service name.
-         *  This is now the physical LED controller
-         *
-         *  @param[in]  service   -  dbus service name
-         *  @param[in]  objPath   -  dbus object path
-         *  @param[in]  property  -  property to be written to
-         *  @param[in]  value     -  Value to write
-         */
-        template <typename T>
-        void drivePhysicalLED(const std::string& service,
-                              const std::string& objPath,
-                              const std::string& property,
-                              const T& value)
-        {
-            sdbusplus::message::variant<T> data = value;
+    /** @brief Makes a dbus call to a passed in service name.
+     *  This is now the physical LED controller
+     *
+     *  @param[in]  service   -  dbus service name
+     *  @param[in]  objPath   -  dbus object path
+     *  @param[in]  property  -  property to be written to
+     *  @param[in]  value     -  Value to write
+     */
+    template <typename T>
+    void drivePhysicalLED(const std::string& service,
+                          const std::string& objPath,
+                          const std::string& property, const T& value)
+    {
+        sdbusplus::message::variant<T> data = value;
 
-            auto method = bus.new_method_call(service.c_str(), objPath.c_str(),
-                                              DBUS_PROPERTY_IFACE, "Set");
-            method.append(PHY_LED_IFACE);
-            method.append(property);
-            method.append(data);
+        auto method = bus.new_method_call(service.c_str(), objPath.c_str(),
+                                          DBUS_PROPERTY_IFACE, "Set");
+        method.append(PHY_LED_IFACE);
+        method.append(property);
+        method.append(data);
 
-            // There will be exceptions going forward and hence don't need a
-            // response
-            bus.call_noreply(method);
-            return;
-        }
+        // There will be exceptions going forward and hence don't need a
+        // response
+        bus.call_noreply(method);
+        return;
+    }
 
-        /** @brief Populates map of Physical LED paths to service name */
-        void populateObjectMap();
+    /** @brief Populates map of Physical LED paths to service name */
+    void populateObjectMap();
 };
 
 } // namespace led
diff --git a/test/led-test-map.hpp b/test/led-test-map.hpp
index 0b44ee3..f76d00e 100644
--- a/test/led-test-map.hpp
+++ b/test/led-test-map.hpp
@@ -1,240 +1,243 @@
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>> singleLedOn = {
-    {   "/xyz/openbmc_project/ledmanager/groups/SingleLed",{
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-        }
-    },
+#include "ledlayout.hpp"
+
+#include <map>
+#include <set>
+#include <string>
+
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    singleLedOn = {
+        {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
+         {
+             {"One", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::Blink},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>> singleLedBlink = {
-    {   "/xyz/openbmc_project/ledmanager/groups/SingleLed",{
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    singleLedBlink = {
+        {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
+         {
+             {"One", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::Blink},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>> singleLedBlinkOverrideOn = {
-    {   "/xyz/openbmc_project/ledmanager/groups/SingleLed",{
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    singleLedBlinkOverrideOn = {
+        {"/xyz/openbmc_project/ledmanager/groups/SingleLed",
+         {
+             {"One", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::On},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>> multipleLedsOn = {
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLeds",{
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    multipleLedsOn = {
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLeds",
+         {
+             {"One", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Two", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>> multipleLedsBlink = {
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLeds",{
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Three",phosphor::led::Layout::Blink,0,
-                0, phosphor::led::Layout::Blink},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    multipleLedsBlink = {
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLeds",
+         {
+             {"One", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::Blink},
+             {"Two", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::Blink},
+             {"Three", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::Blink},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>> multipleLedsOnAndBlink = {
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsMix",{
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Two",phosphor::led::Layout::On,
-                0, phosphor::led::Layout::Blink},
-            {"Three",phosphor::led::Layout::Blink,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On,
-                0, phosphor::led::Layout::Blink},
-            {"Five",phosphor::led::Layout::On,
-                0, phosphor::led::Layout::Blink},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    multipleLedsOnAndBlink = {
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsMix",
+         {
+             {"One", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::Blink},
+             {"Two", phosphor::led::Layout::On, 0,
+              phosphor::led::Layout::Blink},
+             {"Three", phosphor::led::Layout::Blink, 0,
+              phosphor::led::Layout::On},
+             {"Four", phosphor::led::Layout::On, 0,
+              phosphor::led::Layout::Blink},
+             {"Five", phosphor::led::Layout::On, 0,
+              phosphor::led::Layout::Blink},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>> twoGroupsWithDistinctLEDsOn = {
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",{
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-        }
-    },
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",{
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    twoGroupsWithDistinctLEDsOn = {
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
+         {
+             {"One", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::Blink},
+             {"Two", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::Blink},
+         }},
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
+         {
+             {"Four", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::Blink},
+             {"Five", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::Blink},
+             {"Six", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>> twoGroupsWithOneComonLEDOn = {
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",{
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",{
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    twoGroupsWithOneComonLEDOn = {
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
+         {
+             {"One", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Two", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+         }},
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
+         {
+             {"Four", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Six", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>> twoGroupsWithOneComonLEDOnOneLEDBlinkPriority = {
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",{
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-        }
-    },
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",{
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    twoGroupsWithOneComonLEDOnOneLEDBlinkPriority = {
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
+         {
+             {"One", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Two", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::Blink},
+         }},
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
+         {
+             {"Four", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::Blink},
+             {"Six", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>> twoGroupsWithOneComonLEDOnPriority = {
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",{
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",{
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    twoGroupsWithOneComonLEDOnPriority = {
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
+         {
+             {"One", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Two", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::On},
+         }},
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
+         {
+             {"Four", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Six", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>>
-        twoGroupsWithMultiplComonLEDOn = {
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",{
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",{
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Seven",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    twoGroupsWithMultiplComonLEDOn = {
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
+         {
+             {"One", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Two", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+         }},
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
+         {
+             {"Two", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Six", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Seven", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>>
-        twoGroupsWithMultipleComonLEDInDifferentState = {
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",{
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",{
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    twoGroupsWithMultipleComonLEDInDifferentState = {
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
+         {
+             {"One", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Two", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::On},
+             {"Four", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+         }},
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
+         {
+             {"Two", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::On},
+             {"Five", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Six", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+         }},
 };
 
-static const std::map<std::string,
-    std::set<phosphor::led::Layout::LedAction>>
-        twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority = {
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",{
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-        }
-    },
-    {   "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",{
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-        }
-    },
+static const std::map<std::string, std::set<phosphor::led::Layout::LedAction>>
+    twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority = {
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet",
+         {
+             {"One", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Two", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::Blink},
+             {"Four", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Ten", phosphor::led::Layout::Blink, 0, 0,
+              phosphor::led::Layout::Blink},
+         }},
+        {"/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet",
+         {
+             {"Two", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Three", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::Blink},
+             {"Five", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Six", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::On},
+             {"Ten", phosphor::led::Layout::On, 0, 0,
+              phosphor::led::Layout::Blink},
+         }},
 };
diff --git a/test/utest.cpp b/test/utest.cpp
index 455179c..18a4341 100644
--- a/test/utest.cpp
+++ b/test/utest.cpp
@@ -1,22 +1,24 @@
-#include <set>
-#include <algorithm>
-#include <gtest/gtest.h>
-#include <sdbusplus/bus.hpp>
-#include "manager.hpp"
 #include "led-test-map.hpp"
+#include "manager.hpp"
+
+#include <algorithm>
+#include <sdbusplus/bus.hpp>
+#include <set>
+
+#include <gtest/gtest.h>
 using namespace phosphor::led;
 class LedTest : public ::testing::Test
 {
-    public:
-        sdbusplus::bus::bus bus;
-        LedTest() : bus(sdbusplus::bus::new_default())
-        {
-            // Nothing here
-        }
-        ~LedTest()
-        {
-            // Leaving up to auto cleanup.
-        }
+  public:
+    sdbusplus::bus::bus bus;
+    LedTest() : bus(sdbusplus::bus::new_default())
+    {
+        // Nothing here
+    }
+    ~LedTest()
+    {
+        // Leaving up to auto cleanup.
+    }
 };
 
 /** @brief Assert Single LED to On */
@@ -25,24 +27,24 @@
     Manager manager(bus, singleLedOn);
     {
         // Assert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -56,24 +58,24 @@
     Manager manager(bus, singleLedBlink);
     {
         // Assert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -87,24 +89,24 @@
     Manager manager(bus, singleLedOn);
     {
         // Assert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -112,12 +114,12 @@
     }
     {
         // Assert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         EXPECT_EQ(0, ledsAssert.size());
@@ -131,28 +133,26 @@
     Manager manager(bus, multipleLedsOn);
     {
         // Assert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -166,28 +166,28 @@
     Manager manager(bus, multipleLedsBlink);
     {
         // Assert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -201,28 +201,28 @@
     Manager manager(bus, multipleLedsBlink);
     {
         // Assert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -230,28 +230,28 @@
     }
     {
         // Assert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
         EXPECT_EQ(0, ledsAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -265,28 +265,28 @@
     Manager manager(bus, multipleLedsBlink);
     {
         // Assert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -294,28 +294,28 @@
     }
     {
         // DeAssert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
         EXPECT_EQ(0, ledsAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -323,12 +323,12 @@
     }
     {
         // DeAssert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
         EXPECT_EQ(0, ledsDeAssert.size());
         EXPECT_EQ(0, ledsAssert.size());
@@ -341,32 +341,31 @@
     Manager manager(bus, multipleLedsOnAndBlink);
     {
         // Assert the LEDs.
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
         auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsMix";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Two",phosphor::led::Layout::On,
-                0, phosphor::led::Layout::Blink},
-            {"Three",phosphor::led::Layout::Blink,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On,
-                0, phosphor::led::Layout::Blink},
-            {"Five",phosphor::led::Layout::On,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Two", phosphor::led::Layout::On, 0, phosphor::led::Layout::Blink},
+            {"Three", phosphor::led::Layout::Blink, 0,
+             phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0,
+             phosphor::led::Layout::Blink},
+            {"Five", phosphor::led::Layout::On, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -380,28 +379,27 @@
     Manager manager(bus, twoGroupsWithDistinctLEDsOn);
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -409,28 +407,27 @@
     }
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -444,28 +441,26 @@
     Manager manager(bus, twoGroupsWithOneComonLEDOn);
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -473,26 +468,25 @@
     }
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -507,28 +501,26 @@
     Manager manager(bus, twoGroupsWithOneComonLEDOnOneLEDBlinkPriority);
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -536,27 +528,26 @@
     }
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         // Does not action on [Three] since  priority is [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -564,27 +555,26 @@
     }
     {
         // De-Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsDeAssserted populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
         EXPECT_EQ(0, ledsAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
         // [Three] is not touched since its already [Blink]
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -599,28 +589,26 @@
     Manager manager(bus, twoGroupsWithOneComonLEDOnOneLEDBlinkPriority);
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -628,27 +616,26 @@
     }
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         // [Three] does not get actioned since it has Blink priority
         std::set<Layout::LedAction> refAssert = {
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -656,25 +643,23 @@
     }
     {
         // De-Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsDeAssserted populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -682,13 +667,13 @@
 
         // Need just the ledsAssert populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp1 {};
+        Manager::group temp1{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp1, temp1.begin()));
@@ -703,28 +688,26 @@
     Manager manager(bus, twoGroupsWithOneComonLEDOnPriority);
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true,
-                                            ledsAssert, ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -732,56 +715,53 @@
     }
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         // Three is set to ON due to ON priority.
         std::set<Layout::LedAction> refAssert = {
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
     }
     {
         // De-Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsDeAssserted populated with these.
         // [Three] stays in [On] since [B] has it [On]
         std::set<Layout::LedAction> refDeAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
         EXPECT_EQ(0, ledsAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -796,28 +776,26 @@
     Manager manager(bus, twoGroupsWithOneComonLEDOnPriority);
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -825,54 +803,52 @@
     }
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         // Three is set to ON due to ON priority.
         std::set<Layout::LedAction> refAssert = {
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
     }
     {
         // De-Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsDeAssserted populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -881,13 +857,13 @@
         // Need just the ledsAssert populated with these.
         // Since [Three] stood [On], need to go back to [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp1 {};
+        Manager::group temp1{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -901,30 +877,28 @@
     Manager manager(bus, twoGroupsWithMultiplComonLEDOn);
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Seven",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Seven", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -932,24 +906,23 @@
     }
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -957,31 +930,29 @@
     }
     {
         // De-Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsDeAssserted populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Seven",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Seven", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
         EXPECT_EQ(0, ledsAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
         EXPECT_EQ(0, temp.size());
-
     }
 }
 
@@ -991,30 +962,28 @@
     Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentState);
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1022,28 +991,27 @@
     }
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these
         // [Two] remains [On] due to higher priority.
         // [Three] remains [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1057,31 +1025,30 @@
     Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentState);
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.'Two' gets to Blink
         // due to higher priority.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1089,30 +1056,28 @@
     }
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         // [Three] remains [Blink] from previous
         // [Two] moves to [On] from [Blink] due to [On] priority
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1123,35 +1088,35 @@
 /** @brief Assert 2 groups having multiple LEDs common in different state
  *  DeAssert twice
  */
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateAtoBDeAssertTwice)
+TEST_F(LedTest,
+       assertTwoGroupsWithMultipleComonLEDInDifferentStateAtoBDeAssertTwice)
 {
     Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentState);
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1159,30 +1124,28 @@
     }
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         // [Two] turns [On] due to priority
         // [Three] remains [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1190,25 +1153,24 @@
     }
     {
         // DeAssert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1217,13 +1179,13 @@
         // Need just the ledsAssert populated with these.
         // [Two] will go back to [Blink] from [On]
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp1 {};
+        Manager::group temp1{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp1, temp1.begin()));
@@ -1231,30 +1193,29 @@
     }
     {
         // DeAssert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
         EXPECT_EQ(0, ledsAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1262,12 +1223,12 @@
     }
     {
         // DeAssert Set-A again and make sure we get all empty
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
         EXPECT_EQ(0, ledsDeAssert.size());
         EXPECT_EQ(0, ledsAssert.size());
@@ -1277,37 +1238,38 @@
 /** @brief Assert 2 groups having multiple LEDs common in different state and
  *  mixed priority. DeAssert-A
  */
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityAandB)
+TEST_F(LedTest,
+       assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityAandB)
 {
-    Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
+    Manager manager(bus,
+                    twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Ten", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1315,12 +1277,12 @@
     }
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
@@ -1328,18 +1290,16 @@
         // [Three] remains on since it never was in [Blink] before
         // [Ten] remains [Blink] due to priority: [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1347,20 +1307,19 @@
     }
     {
         // De-Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsDeAsssert populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
 
@@ -1369,13 +1328,13 @@
         // [Three] remains [On] since it never changed state.
         // [Two] remains [On] since it did not go back
         std::set<Layout::LedAction> refAssert = {
-            {"Ten",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
+            {"Ten", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1386,37 +1345,39 @@
 /** @brief Assert 2 groups having multiple LEDs common in different state and
  *  mixed priority. DeAssert-B
  */
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityAandBDeAssertB)
+TEST_F(
+    LedTest,
+    assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityAandBDeAssertB)
 {
-    Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
+    Manager manager(bus,
+                    twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Ten", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1424,12 +1385,12 @@
     }
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
@@ -1437,18 +1398,16 @@
         // [Three] remains on since it never was in [Blink] before
         // [Ten] remains [Blink] due to priority: [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1456,20 +1415,19 @@
     }
     {
         // De-Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsDeAsssert populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
 
@@ -1478,13 +1436,13 @@
         // [Three] remains [On] since it never changed state.
         // [Two] moves to [Blink] since there is no prior [On]
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1495,37 +1453,37 @@
 /** @brief Assert 2 groups having multiple LEDs common in different state and
  *  mixed priority.
  */
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityBandA)
+TEST_F(LedTest,
+       assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityBandA)
 {
-    Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
+    Manager manager(bus,
+                    twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Ten", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1533,12 +1491,12 @@
     }
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
@@ -1546,18 +1504,17 @@
         // [Three] remains on since it never was in [Blink] before
         // [Ten] moves to [Blink] due to priority: [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Ten", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1568,37 +1525,38 @@
 /** @brief Assert 2 groups having multiple LEDs common in different state and
  *  mixed priority and De-Assert-A
  */
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityBandADeAssertA)
+TEST_F(
+    LedTest,
+    assertTwoGroupsWithMultipleComonLEDInDifferentStateDiffPriorityBandADeAssertA)
 {
-    Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
+    Manager manager(bus,
+                    twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Ten", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1606,12 +1564,12 @@
     }
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
@@ -1619,18 +1577,17 @@
         // [Three] remains on since it never was in [Blink] before
         // [Ten] moves to [Blink] due to priority: [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Ten", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1638,21 +1595,20 @@
     }
     {
         // De-Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsAssserted populated with these.
         // [Ten] remains [Blink] due to priority.
         std::set<Layout::LedAction> refDeAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
 
@@ -1661,13 +1617,13 @@
         // [Three] remains [On] since it never was in [Blink] before
         // [Ten] moves to [On] due to priority: [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"Ten",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
+            {"Ten", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1678,37 +1634,37 @@
 /** @brief Assert 2 groups having multiple LEDs common in different state and
  *  mixed priority and then DeAssert twice.
  */
-TEST_F(LedTest, assertTwoGroupsWithMultipleComonLEDInDifferentStateOnBlinkPriorityBandA)
+TEST_F(LedTest,
+       assertTwoGroupsWithMultipleComonLEDInDifferentStateOnBlinkPriorityBandA)
 {
-    Manager manager(bus, twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
+    Manager manager(bus,
+                    twoGroupsWithMultipleComonLEDInDifferentStateDiffPriority);
     {
         // Assert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
+            {"Two", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Ten", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1716,12 +1672,12 @@
     }
     {
         // Assert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, true, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
         EXPECT_EQ(true, result);
 
         // Need just the ledsAssserted populated with these.
@@ -1729,18 +1685,17 @@
         // [Three] remains on since it never was in [Blink] before
         // [Ten] moves to [Blink] due to priority: [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Ten", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
         EXPECT_EQ(0, ledsDeAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1748,26 +1703,25 @@
     }
     {
         // DeAssert Set-B
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsAssserted populated with these.
         // [Ten] remains [Blink] due to priority.
         std::set<Layout::LedAction> refDeAssert = {
-            {"Five",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Six",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
+            {"Five", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Six", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1776,13 +1730,13 @@
         // Need just the ledsAssert populated with these.
         // [Two] will move to [Blink]
         std::set<Layout::LedAction> refAssert = {
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
         };
         EXPECT_EQ(refAssert.size(), ledsAssert.size());
 
         // difference of refAssert and ledsAssert must be null.
-        Manager::group temp1 {};
+        Manager::group temp1{};
         std::set_difference(ledsAssert.begin(), ledsAssert.end(),
                             refAssert.begin(), refAssert.end(),
                             std::inserter(temp1, temp1.begin()));
@@ -1790,32 +1744,31 @@
     }
     {
         // DeAssert Set-A
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
 
         // Need just the ledsAssserted populated with these.
         std::set<Layout::LedAction> refDeAssert = {
-            {"One",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Two",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::On},
-            {"Three",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::Blink},
-            {"Four",phosphor::led::Layout::On, 0,
-                0, phosphor::led::Layout::On},
-            {"Ten",phosphor::led::Layout::Blink, 0,
-                0, phosphor::led::Layout::Blink},
+            {"One", phosphor::led::Layout::On, 0, 0, phosphor::led::Layout::On},
+            {"Two", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::On},
+            {"Three", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::Blink},
+            {"Four", phosphor::led::Layout::On, 0, 0,
+             phosphor::led::Layout::On},
+            {"Ten", phosphor::led::Layout::Blink, 0, 0,
+             phosphor::led::Layout::Blink},
         };
         EXPECT_EQ(refDeAssert.size(), ledsDeAssert.size());
         EXPECT_EQ(0, ledsAssert.size());
 
         // difference of refDeAssert and ledsDeAssert must be null.
-        Manager::group temp {};
+        Manager::group temp{};
         std::set_difference(ledsDeAssert.begin(), ledsDeAssert.end(),
                             refDeAssert.begin(), refDeAssert.end(),
                             std::inserter(temp, temp.begin()));
@@ -1823,12 +1776,12 @@
     }
     {
         // DeAssert Set-B again and make sure we get all empty
-        Manager::group ledsAssert {};
-        Manager::group ledsDeAssert {};
+        Manager::group ledsAssert{};
+        Manager::group ledsDeAssert{};
 
-        auto group ="/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
-        auto result = manager.setGroupState(group, false, ledsAssert,
-                                            ledsDeAssert);
+        auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
+        auto result =
+            manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
         EXPECT_EQ(false, result);
         EXPECT_EQ(0, ledsDeAssert.size());
         EXPECT_EQ(0, ledsAssert.size());
