diff --git a/test/bios_setting_unittest.cpp b/test/bios_setting_unittest.cpp
index 45373f4..1d7feb8 100644
--- a/test/bios_setting_unittest.cpp
+++ b/test/bios_setting_unittest.cpp
@@ -84,5 +84,77 @@
     std::remove(filename.c_str());
 }
 
+TEST_F(BiosSettingTest, InvalidRequestWrite)
+{
+    // Empty request
+    std::vector<uint8_t> request = {};
+
+    HandlerMock hMock;
+    EXPECT_EQ(::ipmi::responseReqDataLenInvalid(),
+              writeBiosSetting(request, &hMock));
+
+    // Request with payload size 1 but no payload
+    request = {0x01};
+    EXPECT_EQ(::ipmi::responseReqDataLenInvalid(),
+              writeBiosSetting(request, &hMock));
+
+    // Request with payload size 1 but actual payload size of 2 bytes
+    request = {0x01, 0x02, 0x03};
+    EXPECT_EQ(::ipmi::responseReqDataLenInvalid(),
+              writeBiosSetting(request, &hMock));
+
+    // Request with payload size 2 but actual payload of 1 byte
+    request = {0x02, 0x02};
+    EXPECT_EQ(::ipmi::responseReqDataLenInvalid(),
+              writeBiosSetting(request, &hMock));
+}
+
+TEST_F(BiosSettingTest, SuccessfulWrite)
+{
+    std::vector<uint8_t> request = {0x02, 0xDE, 0xAD};
+
+    // Write a dummy file to get around permission issues with CI
+    // (Not needed in local CI)
+    writeTmpFile({});
+    HandlerMock hMock;
+    auto reply = writeBiosSetting(request, &hMock, filename);
+    auto result = ValidateReply(reply);
+    auto& data = result.second;
+
+    EXPECT_EQ(SysOEMCommands::SysWriteBiosSetting, result.first);
+    EXPECT_EQ(std::vector<uint8_t>{2}, data);
+
+    // Validate the payload is correct
+    reply = readBiosSetting(request, &hMock, filename);
+    result = ValidateReply(reply);
+    data = result.second;
+
+    EXPECT_EQ(SysOEMCommands::SysReadBiosSetting, result.first);
+    EXPECT_EQ(request.size() - 1, data.front());
+    EXPECT_EQ(request, data);
+
+    // Verify that we can write a shorter string and it'll replace the original
+    // content of the file
+    request = {0x01, 0x0A};
+
+    reply = writeBiosSetting(request, &hMock, filename);
+    result = ValidateReply(reply);
+    data = result.second;
+
+    EXPECT_EQ(SysOEMCommands::SysWriteBiosSetting, result.first);
+    EXPECT_EQ(std::vector<uint8_t>{1}, data);
+
+    // Validate the payload is correct
+    reply = readBiosSetting(request, &hMock, filename);
+    result = ValidateReply(reply);
+    data = result.second;
+
+    EXPECT_EQ(SysOEMCommands::SysReadBiosSetting, result.first);
+    EXPECT_EQ(request.size() - 1, data.front());
+    EXPECT_EQ(request, data);
+    // Cleanup the settings file
+    std::remove(filename.c_str());
+}
+
 } // namespace ipmi
 } // namespace google
