diff --git a/redfish-core/ut/hex_utils_test.cpp b/redfish-core/ut/hex_utils_test.cpp
index 619f6eb..506dc5a 100644
--- a/redfish-core/ut/hex_utils_test.cpp
+++ b/redfish-core/ut/hex_utils_test.cpp
@@ -1,10 +1,13 @@
 #include "utils/hex_utils.hpp"
 
 #include <gmock/gmock.h>
+#include <gtest/gtest.h>
 
 namespace
 {
 
+using ::testing::IsEmpty;
+
 TEST(IntToHexString, ReturnsCorrectHexForUint64)
 {
     EXPECT_EQ(intToHexString(0xFFFFFFFFFFFFFFFFULL, 16), "FFFFFFFFFFFFFFFF");
@@ -59,14 +62,14 @@
     std::vector<uint8_t> hexBytes = {0x01, 0x23, 0x45, 0x67,
                                      0x89, 0xAB, 0xCD, 0xEF};
     EXPECT_EQ(hexStringToBytes("0123456789ABCDEF"), hexBytes);
-    EXPECT_TRUE(hexStringToBytes("").empty());
+    EXPECT_THAT(hexStringToBytes(""), IsEmpty());
 }
 
 TEST(HexStringToBytes, Failure)
 {
-    EXPECT_TRUE(hexStringToBytes("Hello").empty());
-    EXPECT_TRUE(hexStringToBytes("`").empty());
-    EXPECT_TRUE(hexStringToBytes("012").empty());
+    EXPECT_THAT(hexStringToBytes("Hello"), IsEmpty());
+    EXPECT_THAT(hexStringToBytes("`"), IsEmpty());
+    EXPECT_THAT(hexStringToBytes("012"), IsEmpty());
 }
 
 } // namespace
\ No newline at end of file
diff --git a/redfish-core/ut/json_utils_test.cpp b/redfish-core/ut/json_utils_test.cpp
index 427ed21..a284428 100644
--- a/redfish-core/ut/json_utils_test.cpp
+++ b/redfish-core/ut/json_utils_test.cpp
@@ -4,12 +4,17 @@
 #include <vector>
 
 #include <gmock/gmock.h>
+#include <gtest/gtest.h>
 
 namespace redfish::json_util
 {
 namespace
 {
 
+using ::testing::ElementsAre;
+using ::testing::IsEmpty;
+using ::testing::Not;
+
 TEST(ReadJson, ValidElementsReturnsTrueResponseOkValuesUnpackedCorrectly)
 {
     crow::Response res;
@@ -20,14 +25,14 @@
     int64_t integer = 0;
     std::string str;
     std::vector<uint64_t> vec;
-    EXPECT_TRUE(readJson(jsonRequest, res, "integer", integer, "string", str,
+    ASSERT_TRUE(readJson(jsonRequest, res, "integer", integer, "string", str,
                          "vector", vec));
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
 
     EXPECT_EQ(integer, 1);
     EXPECT_EQ(str, "hello");
-    EXPECT_TRUE((vec == std::vector<uint64_t>{1, 2, 3}));
+    EXPECT_THAT(vec, ElementsAre(1, 2, 3));
 }
 
 TEST(readJson, ExtraElementsReturnsFalseReponseIsBadRequest)
@@ -38,14 +43,14 @@
     std::optional<int> integer;
     std::optional<std::string> str;
 
-    EXPECT_FALSE(readJson(jsonRequest, res, "integer", integer));
+    ASSERT_FALSE(readJson(jsonRequest, res, "integer", integer));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
     EXPECT_EQ(integer, 1);
 
-    EXPECT_FALSE(readJson(jsonRequest, res, "string", str));
+    ASSERT_FALSE(readJson(jsonRequest, res, "string", str));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
     EXPECT_EQ(str, "hello");
 }
 
@@ -56,18 +61,18 @@
 
     int64_t integer = 0;
     std::string str0;
-    EXPECT_FALSE(readJson(jsonRequest, res, "integer", str0));
+    ASSERT_FALSE(readJson(jsonRequest, res, "integer", str0));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 
-    EXPECT_FALSE(readJson(jsonRequest, res, "string0", integer));
+    ASSERT_FALSE(readJson(jsonRequest, res, "string0", integer));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 
-    EXPECT_FALSE(
+    ASSERT_FALSE(
         readJson(jsonRequest, res, "integer", str0, "string0", integer));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 }
 
 TEST(ReadJson, MissingElementReturnsFalseReponseIsBadRequest)
@@ -79,15 +84,15 @@
     std::string str0;
     std::string str1;
     std::vector<uint8_t> vec;
-    EXPECT_FALSE(readJson(jsonRequest, res, "integer", integer, "string0", str0,
+    ASSERT_FALSE(readJson(jsonRequest, res, "integer", integer, "string0", str0,
                           "vector", vec));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 
-    EXPECT_FALSE(readJson(jsonRequest, res, "integer", integer, "string0", str0,
+    ASSERT_FALSE(readJson(jsonRequest, res, "integer", integer, "string0", str0,
                           "string1", str1));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 }
 
 TEST(ReadJson, JsonArrayAreUnpackedCorrectly)
@@ -100,9 +105,9 @@
     )"_json;
 
     std::vector<nlohmann::json> jsonVec;
-    EXPECT_TRUE(readJson(jsonRequest, res, "TestJson", jsonVec));
+    ASSERT_TRUE(readJson(jsonRequest, res, "TestJson", jsonVec));
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
     EXPECT_EQ(jsonVec, R"([{"hello": "yes"}, [{"there": "no"}, "nice"]])"_json);
 }
 
@@ -116,10 +121,10 @@
     )"_json;
 
     int integer = 0;
-    EXPECT_TRUE(readJson(jsonRequest, res, "json/integer", integer));
+    ASSERT_TRUE(readJson(jsonRequest, res, "json/integer", integer));
     EXPECT_EQ(integer, 42);
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
 }
 
 TEST(ReadJson, JsonDeeperSubElementValueAreUnpackedCorrectly)
@@ -134,10 +139,10 @@
     )"_json;
 
     std::string foobar;
-    EXPECT_TRUE(readJson(jsonRequest, res, "json/json2/string", foobar));
+    ASSERT_TRUE(readJson(jsonRequest, res, "json/json2/string", foobar));
     EXPECT_EQ(foobar, "foobar");
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
 }
 
 TEST(ReadJson, MultipleJsonSubElementValueAreUnpackedCorrectly)
@@ -156,13 +161,13 @@
     int integer = 0;
     std::string foobar;
     std::string bazbar;
-    EXPECT_TRUE(readJson(jsonRequest, res, "json/integer", integer,
+    ASSERT_TRUE(readJson(jsonRequest, res, "json/integer", integer,
                          "json/string", foobar, "string", bazbar));
     EXPECT_EQ(integer, 42);
     EXPECT_EQ(foobar, "foobar");
     EXPECT_EQ(bazbar, "bazbar");
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
 }
 
 TEST(ReadJson, ExtraElement)
@@ -194,30 +199,30 @@
     std::optional<std::string> str0;
     std::optional<std::string> str1;
     std::optional<std::vector<uint8_t>> vec;
-    EXPECT_TRUE(readJson(jsonRequest, res, "missing_integer", integer,
+    ASSERT_TRUE(readJson(jsonRequest, res, "missing_integer", integer,
                          "integer", requiredInteger));
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
     EXPECT_TRUE(res.jsonValue.empty());
     EXPECT_EQ(integer, std::nullopt);
 
-    EXPECT_TRUE(readJson(jsonRequest, res, "missing_string", str0, "integer",
+    ASSERT_TRUE(readJson(jsonRequest, res, "missing_string", str0, "integer",
                          requiredInteger));
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
     EXPECT_EQ(str0, std::nullopt);
 
-    EXPECT_TRUE(readJson(jsonRequest, res, "integer", integer, "string", str0,
+    ASSERT_TRUE(readJson(jsonRequest, res, "integer", integer, "string", str0,
                          "vector", vec));
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
     EXPECT_EQ(integer, 1);
     EXPECT_EQ(str0, std::nullopt);
     EXPECT_EQ(vec, std::nullopt);
 
-    EXPECT_TRUE(readJson(jsonRequest, res, "integer", integer, "string0", str0,
+    ASSERT_TRUE(readJson(jsonRequest, res, "integer", integer, "string0", str0,
                          "missing_string", str1));
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
     EXPECT_EQ(str1, std::nullopt);
 }
 
@@ -230,23 +235,23 @@
     std::string str0;
     std::string str1;
     std::vector<uint8_t> vec;
-    EXPECT_FALSE(readJson(jsonRequest, res, "missing_integer", integer));
+    ASSERT_FALSE(readJson(jsonRequest, res, "missing_integer", integer));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 
-    EXPECT_FALSE(readJson(jsonRequest, res, "missing_string", str0));
+    ASSERT_FALSE(readJson(jsonRequest, res, "missing_string", str0));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 
-    EXPECT_FALSE(readJson(jsonRequest, res, "integer", integer, "string", str0,
+    ASSERT_FALSE(readJson(jsonRequest, res, "integer", integer, "string", str0,
                           "vector", vec));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 
-    EXPECT_FALSE(readJson(jsonRequest, res, "integer", integer, "string0", str0,
+    ASSERT_FALSE(readJson(jsonRequest, res, "integer", integer, "string0", str0,
                           "missing_string", str1));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 }
 
 TEST(ReadJsonPatch, ValidElementsReturnsTrueResponseOkValuesUnpackedCorrectly)
@@ -258,9 +263,10 @@
     req.body = "{\"integer\": 1}";
 
     int64_t integer = 0;
-    EXPECT_TRUE(readJsonPatch(req, res, "integer", integer));
+    ASSERT_TRUE(readJsonPatch(req, res, "integer", integer));
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
+    EXPECT_EQ(integer, 1);
 }
 
 TEST(ReadJsonPatch, EmptyObjectReturnsFalseResponseBadRequest)
@@ -272,9 +278,9 @@
     req.body = "{}";
 
     std::optional<int64_t> integer = 0;
-    EXPECT_FALSE(readJsonPatch(req, res, "integer", integer));
+    ASSERT_FALSE(readJsonPatch(req, res, "integer", integer));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 }
 
 TEST(ReadJsonPatch, OdataIgnored)
@@ -286,9 +292,10 @@
     req.body = R"({"@odata.etag": "etag", "integer": 1})";
 
     std::optional<int64_t> integer = 0;
-    EXPECT_TRUE(readJsonPatch(req, res, "integer", integer));
+    ASSERT_TRUE(readJsonPatch(req, res, "integer", integer));
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
+    EXPECT_EQ(integer, 1);
 }
 
 TEST(ReadJsonPatch, OnlyOdataGivesNoOperation)
@@ -300,9 +307,9 @@
     req.body = R"({"@odata.etag": "etag"})";
 
     std::optional<int64_t> integer = 0;
-    EXPECT_FALSE(readJsonPatch(req, res, "integer", integer));
+    ASSERT_FALSE(readJsonPatch(req, res, "integer", integer));
     EXPECT_EQ(res.result(), boost::beast::http::status::bad_request);
-    EXPECT_FALSE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, Not(IsEmpty()));
 }
 
 TEST(ReadJsonAction, ValidElementsReturnsTrueResponseOkValuesUnpackedCorrectly)
@@ -314,9 +321,9 @@
     req.body = "{\"integer\": 1}";
 
     int64_t integer = 0;
-    EXPECT_TRUE(readJsonAction(req, res, "integer", integer));
+    ASSERT_TRUE(readJsonAction(req, res, "integer", integer));
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
     EXPECT_EQ(integer, 1);
 }
 
@@ -329,9 +336,9 @@
     req.body = "{}";
 
     std::optional<int64_t> integer = 0;
-    EXPECT_TRUE(readJsonAction(req, res, "integer", integer));
+    ASSERT_TRUE(readJsonAction(req, res, "integer", integer));
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
-    EXPECT_TRUE(res.jsonValue.empty());
+    EXPECT_THAT(res.jsonValue, IsEmpty());
 }
 
 } // namespace
diff --git a/redfish-core/ut/lock_test.cpp b/redfish-core/ut/lock_test.cpp
index 10c51d3..9c37da3 100644
--- a/redfish-core/ut/lock_test.cpp
+++ b/redfish-core/ut/lock_test.cpp
@@ -2,7 +2,8 @@
 
 #include <string>
 
-#include "gmock/gmock.h"
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
 
 namespace crow::ibm_mc_lock
 {
@@ -22,6 +23,7 @@
 using RcReleaseLockApi = std::pair<bool, std::variant<bool, RcRelaseLock>>;
 using SessionFlags = std::pair<SType, SType>;
 using ListOfSessionIds = std::vector<std::string>;
+using ::testing::IsEmpty;
 
 class LockTest : public ::testing::Test
 {
@@ -113,7 +115,7 @@
 {
     MockLock lockManager;
     const LockRequest& t = record;
-    ASSERT_EQ(1, lockManager.isValidLockRequest(t));
+    EXPECT_TRUE(lockManager.isValidLockRequest(t));
 }
 
 TEST_F(LockTest, ValidationBadTestWithLocktype)
@@ -122,7 +124,7 @@
     // Corrupt the lock type
     std::get<2>(record) = "rwrite";
     const LockRequest& t = record;
-    ASSERT_EQ(0, lockManager.isValidLockRequest(t));
+    EXPECT_FALSE(lockManager.isValidLockRequest(t));
 }
 
 TEST_F(LockTest, ValidationBadTestWithlockFlags)
@@ -131,7 +133,7 @@
     // Corrupt the lockflag
     std::get<4>(record)[0].first = "lock";
     const LockRequest& t = record;
-    ASSERT_EQ(0, lockManager.isValidLockRequest(t));
+    EXPECT_FALSE(lockManager.isValidLockRequest(t));
 }
 
 TEST_F(LockTest, ValidationBadTestWithSegmentlength)
@@ -140,14 +142,14 @@
     // Corrupt the Segment length
     std::get<4>(record)[0].second = 7;
     const LockRequest& t = record;
-    ASSERT_EQ(0, lockManager.isValidLockRequest(t));
+    EXPECT_FALSE(lockManager.isValidLockRequest(t));
 }
 
 TEST_F(LockTest, MultiRequestWithoutConflict)
 {
     MockLock lockManager;
     const LockRequests& t = request;
-    ASSERT_EQ(0, lockManager.isConflictRequest(t));
+    EXPECT_FALSE(lockManager.isConflictRequest(t));
 }
 
 TEST_F(LockTest, MultiRequestWithConflictduetoSameSegmentLength)
@@ -159,7 +161,7 @@
     // resource
     std::get<4>(request[0])[0].first = "LockAll";
     const LockRequests& t = request;
-    ASSERT_EQ(1, lockManager.isConflictRequest(t));
+    EXPECT_TRUE(lockManager.isConflictRequest(t));
 }
 
 TEST_F(LockTest, MultiRequestWithoutConflictduetoDifferentSegmentData)
@@ -177,7 +179,7 @@
     std::get<3>(request[0]) = 216179379183550464; // HEX 03 00 06 00 00 00 00 00
     std::get<3>(request[1]) = 288236973221478400; // HEX 04 00 06 00 00 00 00 00
     const LockRequests& t = request;
-    ASSERT_EQ(0, lockManager.isConflictRequest(t));
+    EXPECT_FALSE(lockManager.isConflictRequest(t));
 }
 
 TEST_F(LockTest, MultiRequestWithConflictduetoSameSegmentData)
@@ -189,12 +191,13 @@
     // resource
     std::get<4>(request[0])[0].first = "DontLock";
     std::get<4>(request[0])[1].first = "LockAll";
-    // Dont Change the resource id(1st & 2nd byte) at all, so that the conflict
-    // occurs from the second segment which is trying to lock all the resources.
+    // Dont Change the resource id(1st & 2nd byte) at all, so that the
+    // conflict occurs from the second segment which is trying to lock all
+    // the resources.
     std::get<3>(request[0]) = 216173882346831872; // 03 00 01 00 2B 00 00 00
     std::get<3>(request[1]) = 216173882346831872; // 03 00 01 00 2B 00 00 00
     const LockRequests& t = request;
-    ASSERT_EQ(1, lockManager.isConflictRequest(t));
+    EXPECT_TRUE(lockManager.isConflictRequest(t));
 }
 
 TEST_F(LockTest, MultiRequestWithoutConflictduetoDifferentSegmentLength)
@@ -210,7 +213,7 @@
     std::get<4>(request[0])[0].second = 3;
     const LockRequests& t = request;
     // Return No Conflict
-    ASSERT_EQ(0, lockManager.isConflictRequest(t));
+    EXPECT_FALSE(lockManager.isConflictRequest(t));
 }
 
 TEST_F(LockTest, MultiRequestWithoutConflictduetoReadLocktype)
@@ -221,7 +224,7 @@
     std::get<4>(request[0])[0].first = "LockAll";
     const LockRequests& t = request;
     // Return No Conflict
-    ASSERT_EQ(0, lockManager.isConflictRequest(t));
+    EXPECT_FALSE(lockManager.isConflictRequest(t));
 }
 
 TEST_F(LockTest, MultiRequestWithoutConflictduetoReadLocktypeAndLockall)
@@ -233,7 +236,7 @@
     std::get<4>(request[0])[1].first = "LockAll";
     const LockRequests& t = request;
     // Return No Conflict
-    ASSERT_EQ(0, lockManager.isConflictRequest(t));
+    EXPECT_FALSE(lockManager.isConflictRequest(t));
 }
 
 TEST_F(LockTest, RequestConflictedWithLockTableEntries)
@@ -248,7 +251,7 @@
     const LockRequests& p = request;
     auto rc2 = lockManager.isConflictWithTable(p);
     // Return a Conflict
-    ASSERT_EQ(1, rc2.first);
+    EXPECT_TRUE(rc2.first);
 }
 
 TEST_F(LockTest, RequestNotConflictedWithLockTableEntries)
@@ -264,15 +267,15 @@
     const LockRequests& p = request;
     auto rc2 = lockManager.isConflictWithTable(p);
     // Return No Conflict
-    ASSERT_EQ(0, rc2.first);
+    EXPECT_FALSE(rc2.first);
 }
 
 TEST_F(LockTest, TestGenerateTransactionIDFunction)
 {
     MockLock lockManager;
-    uint32_t transactionid1 = lockManager.generateTransactionId();
-    uint32_t transactionid2 = lockManager.generateTransactionId();
-    EXPECT_TRUE(transactionid2 == ++transactionid1);
+    uint32_t transactionId1 = lockManager.generateTransactionId();
+    uint32_t transactionId2 = lockManager.generateTransactionId();
+    EXPECT_EQ(transactionId2, ++transactionId1);
 }
 
 TEST_F(LockTest, ValidateTransactionIDsGoodTestCase)
@@ -283,7 +286,7 @@
     auto rc1 = lockManager.isConflictWithTable(t);
     std::vector<uint32_t> tids = {1};
     const std::vector<uint32_t>& p = tids;
-    ASSERT_EQ(1, lockManager.validateRids(p));
+    EXPECT_TRUE(lockManager.validateRids(p));
 }
 
 TEST_F(LockTest, ValidateTransactionIDsBadTestCase)
@@ -294,7 +297,7 @@
     auto rc1 = lockManager.isConflictWithTable(t);
     std::vector<uint32_t> tids = {10};
     const std::vector<uint32_t>& p = tids;
-    ASSERT_EQ(0, lockManager.validateRids(p));
+    EXPECT_FALSE(lockManager.validateRids(p));
 }
 
 TEST_F(LockTest, ValidateisItMyLockGoodTestCase)
@@ -309,7 +312,7 @@
     std::string sessionid = "xxxxx";
     std::pair<SType, SType> ids = std::make_pair(hmcid, sessionid);
     auto rc = lockManager.isItMyLock(p, ids);
-    ASSERT_EQ(1, rc.first);
+    EXPECT_TRUE(rc.first);
 }
 
 TEST_F(LockTest, ValidateisItMyLockBadTestCase)
@@ -326,7 +329,7 @@
     std::string sessionid = "random";
     std::pair<SType, SType> ids = std::make_pair(hmcid, sessionid);
     auto rc = lockManager.isItMyLock(p, ids);
-    ASSERT_EQ(0, rc.first);
+    EXPECT_FALSE(rc.first);
 }
 
 TEST_F(LockTest, ValidateSessionIDForGetlocklistBadTestCase)
@@ -339,7 +342,7 @@
     auto status = lockManager.getLockList(sessionid);
     auto result =
         std::get<std::vector<std::pair<uint32_t, LockRequests>>>(status);
-    ASSERT_EQ(0, result.size());
+    EXPECT_THAT(result, IsEmpty());
 }
 
 TEST_F(LockTest, ValidateSessionIDForGetlocklistGoodTestCase)
@@ -352,7 +355,7 @@
     auto status = lockManager.getLockList(sessionid);
     auto result =
         std::get<std::vector<std::pair<uint32_t, LockRequests>>>(status);
-    ASSERT_EQ(1, result.size());
+    EXPECT_EQ(result.size(), 1);
 }
 
 } // namespace
diff --git a/redfish-core/ut/privileges_test.cpp b/redfish-core/ut/privileges_test.cpp
index 3813b54..c5a7a87 100644
--- a/redfish-core/ut/privileges_test.cpp
+++ b/redfish-core/ut/privileges_test.cpp
@@ -11,12 +11,15 @@
 namespace
 {
 
+using ::testing::IsEmpty;
+using ::testing::UnorderedElementsAre;
+
 TEST(PrivilegeTest, PrivilegeConstructor)
 {
     Privileges privileges{"Login", "ConfigureManager"};
 
     EXPECT_THAT(privileges.getActivePrivilegeNames(PrivilegeType::BASE),
-                ::testing::UnorderedElementsAre("Login", "ConfigureManager"));
+                UnorderedElementsAre("Login", "ConfigureManager"));
 }
 
 TEST(PrivilegeTest, PrivilegeCheckForNoPrivilegesRequired)
@@ -96,10 +99,10 @@
     Privileges privileges;
 
     EXPECT_THAT(privileges.getActivePrivilegeNames(PrivilegeType::BASE),
-                ::testing::IsEmpty());
+                IsEmpty());
 
     EXPECT_THAT(privileges.getActivePrivilegeNames(PrivilegeType::OEM),
-                ::testing::IsEmpty());
+                IsEmpty());
 }
 
 TEST(PrivilegeTest, GetActivePrivilegeNames)
@@ -107,7 +110,7 @@
     Privileges privileges;
 
     EXPECT_THAT(privileges.getActivePrivilegeNames(PrivilegeType::BASE),
-                ::testing::IsEmpty());
+                IsEmpty());
 
     std::array<const char*, 5> expectedPrivileges{
         "Login", "ConfigureManager", "ConfigureUsers", "ConfigureComponents",
@@ -118,11 +121,11 @@
         EXPECT_TRUE(privileges.setSinglePrivilege(privilege));
     }
 
-    EXPECT_THAT(privileges.getActivePrivilegeNames(PrivilegeType::BASE),
-                ::testing::UnorderedElementsAre(
-                    expectedPrivileges[0], expectedPrivileges[1],
-                    expectedPrivileges[2], expectedPrivileges[3],
-                    expectedPrivileges[4]));
+    EXPECT_THAT(
+        privileges.getActivePrivilegeNames(PrivilegeType::BASE),
+        UnorderedElementsAre(expectedPrivileges[0], expectedPrivileges[1],
+                             expectedPrivileges[2], expectedPrivileges[3],
+                             expectedPrivileges[4]));
 }
 } // namespace
 } // namespace redfish
\ No newline at end of file
diff --git a/redfish-core/ut/stl_utils_test.cpp b/redfish-core/ut/stl_utils_test.cpp
index 7242200..0c8e8c1 100644
--- a/redfish-core/ut/stl_utils_test.cpp
+++ b/redfish-core/ut/stl_utils_test.cpp
@@ -2,16 +2,20 @@
 
 #include <string>
 
+#include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
 namespace redfish::stl_utils
 {
 namespace
 {
+using ::testing::ElementsAre;
+
 TEST(FirstDuplicate, ReturnsIteratorToFirstDuplicate)
 {
     std::vector<std::string> strVec = {"s1", "s4", "s1", "s2", "", "s3", "s3"};
     auto iter = firstDuplicate(strVec.begin(), strVec.end());
+    ASSERT_NE(iter, strVec.end());
     EXPECT_EQ(*iter, "s3");
 }
 
@@ -20,12 +24,7 @@
     std::vector<std::string> strVec = {"s1", "s4", "s1", "s2", "", "s3", "s3"};
     removeDuplicate(strVec);
 
-    EXPECT_EQ(strVec.size(), 5);
-    EXPECT_EQ(strVec[0], "s1");
-    EXPECT_EQ(strVec[1], "s4");
-    EXPECT_EQ(strVec[2], "s2");
-    EXPECT_EQ(strVec[3], "");
-    EXPECT_EQ(strVec[4], "s3");
+    EXPECT_THAT(strVec, ElementsAre("s1", "s4", "s2", "", "s3"));
 }
 } // namespace
 } // namespace redfish::stl_utils
diff --git a/redfish-core/ut/time_utils_test.cpp b/redfish-core/ut/time_utils_test.cpp
index ee2e037..e97e9a7 100644
--- a/redfish-core/ut/time_utils_test.cpp
+++ b/redfish-core/ut/time_utils_test.cpp
@@ -59,8 +59,7 @@
     uint64_t maxAcceptedTimeMs =
         static_cast<uint64_t>(std::chrono::milliseconds::max().count());
 
-    EXPECT_THAT(toDurationStringFromUint(maxAcceptedTimeMs),
-                ::testing::Ne(std::nullopt));
+    EXPECT_NE(toDurationStringFromUint(maxAcceptedTimeMs), std::nullopt);
     EXPECT_EQ(toDurationStringFromUint(0), "PT");
     EXPECT_EQ(toDurationStringFromUint(250), "PT0.250S");
     EXPECT_EQ(toDurationStringFromUint(5000), "PT5.000S");
