diff --git a/tests/dsp/platform.cpp b/tests/dsp/platform.cpp
index 1cfdb0a..4427cbc 100644
--- a/tests/dsp/platform.cpp
+++ b/tests/dsp/platform.cpp
@@ -3594,6 +3594,175 @@
 }
 
 #ifdef LIBPLDM_API_TESTING
+TEST(SetNumericSensorEnable, testDecodeRequest)
+{
+    int rc;
+    struct pldm_set_numeric_sensor_enable_req decoded;
+
+    const std::array<uint8_t, hdrSize + 5> req
+        // PLDM header
+        {
+            PLDM_PLATFORM, 0x80, PLDM_SET_NUMERIC_SENSOR_ENABLE,
+            0x67,          0x45, // sensor ID 0x4567
+            0x00,                // sensorOperationalState
+            0x01,                // sensorEventMessageEnable
+            0x00,                // extra
+        };
+
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+    auto msg = reinterpret_cast<const pldm_msg*>(req.data());
+
+    // Good decode
+    rc = decode_set_numeric_sensor_enable_req(msg, 4, &decoded);
+    EXPECT_EQ(rc, 0);
+    EXPECT_EQ(decoded.sensor_id, 0x4567);
+    EXPECT_EQ(decoded.op_state, PLDM_SENSOR_ENABLED);
+    EXPECT_EQ(decoded.event_enable, PLDM_EVENTS_DISABLED);
+
+    // Fail short
+    rc = decode_set_numeric_sensor_enable_req(msg, 3, &decoded);
+    EXPECT_EQ(rc, -EOVERFLOW);
+    // Fail long
+    rc = decode_set_numeric_sensor_enable_req(msg, 5, &decoded);
+    EXPECT_EQ(rc, -EBADMSG);
+}
+#endif // LIBPLDM_API_TESTING
+
+#ifdef LIBPLDM_API_TESTING
+TEST(SetNumericSensorEnable, testDecodeInvalidOpRequest)
+{
+    int rc;
+    struct pldm_set_numeric_sensor_enable_req decoded;
+
+    const std::array<uint8_t, hdrSize + 4> req
+        // PLDM header
+        {
+            PLDM_PLATFORM, 0x80, PLDM_SET_NUMERIC_SENSOR_ENABLE,
+            0x67,          0x45, // sensor ID 0x4567
+            0x30,                // Invalid sensorOperationalState
+            0x01,                // sensorEventMessageEnable
+        };
+
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+    auto msg = reinterpret_cast<const pldm_msg*>(req.data());
+
+    rc = decode_set_numeric_sensor_enable_req(msg, 4, &decoded);
+    EXPECT_EQ(rc, -EPROTO);
+}
+#endif // LIBPLDM_API_TESTING
+
+#ifdef LIBPLDM_API_TESTING
+TEST(SetNumericSensorEnable, testDecodeInvalidEventRequest)
+{
+    int rc;
+    struct pldm_set_numeric_sensor_enable_req decoded;
+
+    const std::array<uint8_t, hdrSize + 4> req
+        // PLDM header
+        {
+            PLDM_PLATFORM, 0x80, PLDM_SET_NUMERIC_SENSOR_ENABLE,
+            0x67,          0x45, // sensor ID 0x4567
+            0x00,                // sensorOperationalState
+            0x77,                // Invalid sensorEventMessageEnable
+        };
+
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+    auto msg = reinterpret_cast<const pldm_msg*>(req.data());
+
+    rc = decode_set_numeric_sensor_enable_req(msg, 4, &decoded);
+    EXPECT_EQ(rc, -EPROTO);
+}
+#endif // LIBPLDM_API_TESTING
+
+#ifdef LIBPLDM_API_TESTING
+TEST(SetStateSensorEnables, testDecodeRequest)
+{
+    int rc;
+    struct pldm_set_state_sensor_enables_req decoded;
+
+    const std::array<uint8_t, hdrSize + 8> req
+        // PLDM header
+        {
+            PLDM_PLATFORM, 0x80, PLDM_SET_STATE_SENSOR_ENABLES,
+            0x67,          0x45, // sensor ID 0x4567
+            0x02,                // count
+            0x01,          0x00, // field 0
+            0x02,          0x01, // field 1
+            0x00,                // extra byte
+        };
+
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+    auto msg = reinterpret_cast<const pldm_msg*>(req.data());
+
+    // Good decode
+    rc = decode_set_state_sensor_enables_req(msg, 7, &decoded);
+    EXPECT_EQ(rc, 0);
+    EXPECT_EQ(decoded.sensor_id, 0x4567);
+    EXPECT_EQ(decoded.field_count, 2);
+    EXPECT_EQ(decoded.fields[0].op_state, PLDM_SET_SENSOR_DISABLED);
+    EXPECT_EQ(decoded.fields[0].event_enable, PLDM_NO_EVENT_GENERATION);
+    EXPECT_EQ(decoded.fields[1].op_state, PLDM_SET_SENSOR_UNAVAILABLE);
+    EXPECT_EQ(decoded.fields[1].event_enable, PLDM_EVENTS_DISABLED);
+
+    // Short message
+    rc = decode_set_state_sensor_enables_req(msg, 6, &decoded);
+    EXPECT_EQ(rc, -EOVERFLOW);
+
+    // Overlength message
+    rc = decode_set_state_sensor_enables_req(msg, 8, &decoded);
+    EXPECT_EQ(rc, -EBADMSG);
+}
+#endif // LIBPLDM_API_TESTING
+
+#ifdef LIBPLDM_API_TESTING
+TEST(SetStateSensorEnables, testDecodeInvalidOpRequest)
+{
+    int rc;
+    struct pldm_set_state_sensor_enables_req decoded;
+
+    const std::array<uint8_t, hdrSize + 7> req
+        // PLDM header
+        {
+            PLDM_PLATFORM, 0x80, PLDM_SET_STATE_SENSOR_ENABLES,
+            0x67,          0x45, // sensor ID 0x4567
+            0x02,                // count
+            0x01,          0x00, // field 0
+            0x99,          0x01, // field 1 invalid op
+        };
+
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+    auto msg = reinterpret_cast<const pldm_msg*>(req.data());
+
+    rc = decode_set_state_sensor_enables_req(msg, 7, &decoded);
+    EXPECT_EQ(rc, -EPROTO);
+}
+#endif // LIBPLDM_API_TESTING
+
+#ifdef LIBPLDM_API_TESTING
+TEST(SetStateSensorEnables, testDecodeInvalidEventRequest)
+{
+    int rc;
+    struct pldm_set_state_sensor_enables_req decoded;
+
+    const std::array<uint8_t, hdrSize + 7> req
+        // PLDM header
+        {
+            PLDM_PLATFORM, 0x80, PLDM_SET_STATE_SENSOR_ENABLES,
+            0x67,          0x45, // sensor ID 0x4567
+            0x02,                // count
+            0x01,          0x00, // field 0
+            0x00,          0x77, // field 1 invalid event
+        };
+
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+    auto msg = reinterpret_cast<const pldm_msg*>(req.data());
+
+    rc = decode_set_state_sensor_enables_req(msg, 7, &decoded);
+    EXPECT_EQ(rc, -EPROTO);
+}
+#endif // LIBPLDM_API_TESTING
+
+#ifdef LIBPLDM_API_TESTING
 TEST(GetEventReceiver, testGoodEncodeRequest)
 {
     std::array<uint8_t, hdrSize> requestMsg{};
