diff --git a/test/libpldm_platform_test.cpp b/test/libpldm_platform_test.cpp
index b046e3f..1010bd8 100644
--- a/test/libpldm_platform_test.cpp
+++ b/test/libpldm_platform_test.cpp
@@ -7,6 +7,8 @@
 
 #include <gtest/gtest.h>
 
+constexpr auto hdrSize = sizeof(pldm_msg_hdr);
+
 TEST(SetStateEffecterStates, testEncodeResponse)
 {
     std::array<uint8_t,
@@ -56,17 +58,20 @@
 
 TEST(SetStateEffecterStates, testGoodDecodeResponse)
 {
-    std::array<uint8_t, PLDM_SET_STATE_EFFECTER_STATES_RESP_BYTES>
+    std::array<uint8_t, hdrSize + PLDM_SET_STATE_EFFECTER_STATES_RESP_BYTES>
         responseMsg{};
 
     uint8_t completion_code = 0xA0;
 
     uint8_t retcompletion_code = 0;
 
-    memcpy(responseMsg.data(), &completion_code, sizeof(completion_code));
+    memcpy(responseMsg.data() + hdrSize, &completion_code,
+           sizeof(completion_code));
+
+    auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
 
     auto rc = decode_set_state_effecter_states_resp(
-        responseMsg.data(), responseMsg.size(), &retcompletion_code);
+        response, responseMsg.size() - hdrSize, &retcompletion_code);
 
     ASSERT_EQ(rc, PLDM_SUCCESS);
     ASSERT_EQ(completion_code, retcompletion_code);
@@ -74,7 +79,8 @@
 
 TEST(SetStateEffecterStates, testGoodDecodeRequest)
 {
-    std::array<uint8_t, PLDM_SET_STATE_EFFECTER_STATES_REQ_BYTES> requestMsg{};
+    std::array<uint8_t, hdrSize + PLDM_SET_STATE_EFFECTER_STATES_REQ_BYTES>
+        requestMsg{};
 
     uint16_t effecterId = 0x32;
     uint8_t compEffecterCnt = 0x2;
@@ -88,14 +94,17 @@
 
     std::array<set_effecter_state_field, 8> retStateField{};
 
-    memcpy(requestMsg.data(), &effecterId, sizeof(effecterId));
-    memcpy(requestMsg.data() + sizeof(effecterId), &compEffecterCnt,
+    memcpy(requestMsg.data() + hdrSize, &effecterId, sizeof(effecterId));
+    memcpy(requestMsg.data() + sizeof(effecterId) + hdrSize, &compEffecterCnt,
            sizeof(compEffecterCnt));
-    memcpy(requestMsg.data() + sizeof(effecterId) + sizeof(compEffecterCnt),
+    memcpy(requestMsg.data() + sizeof(effecterId) + sizeof(compEffecterCnt) +
+               hdrSize,
            &stateField, sizeof(stateField));
 
+    auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
+
     auto rc = decode_set_state_effecter_states_req(
-        requestMsg.data(), requestMsg.size(), &retEffecterId,
+        request, requestMsg.size() - hdrSize, &retEffecterId,
         &retCompEffecterCnt, retStateField.data());
 
     ASSERT_EQ(rc, PLDM_SUCCESS);
@@ -109,7 +118,7 @@
 
 TEST(SetStateEffecterStates, testBadDecodeRequest)
 {
-    const uint8_t* msg = NULL;
+    const struct pldm_msg* msg = NULL;
 
     auto rc = decode_set_state_effecter_states_req(msg, sizeof(*msg), NULL,
                                                    NULL, NULL);
@@ -122,7 +131,9 @@
     std::array<uint8_t, PLDM_SET_STATE_EFFECTER_STATES_RESP_BYTES>
         responseMsg{};
 
-    auto rc = decode_set_state_effecter_states_resp(responseMsg.data(),
+    auto response = reinterpret_cast<pldm_msg*>(responseMsg.data());
+
+    auto rc = decode_set_state_effecter_states_resp(response,
                                                     responseMsg.size(), NULL);
 
     ASSERT_EQ(rc, PLDM_ERROR_INVALID_DATA);
