diff --git a/test/Makefile.am b/test/Makefile.am
index 8aca7f1..41e859b 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -38,7 +38,8 @@
 	firmware_state_verificationpending_unittest \
 	firmware_state_verificationstarted_unittest \
 	firmware_state_verificationcompleted_unittest \
-	firmware_state_updatepending_unittest
+	firmware_state_updatepending_unittest \
+	firmware_state_updatestarted_unittest
 
 if BUILD_HOST_TOOL
 check_PROGRAMS += \
@@ -103,6 +104,9 @@
 firmware_state_updatepending_unittest_SOURCES = firmware_state_updatepending_unittest.cpp
 firmware_state_updatepending_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
 
+firmware_state_updatestarted_unittest_SOURCES = firmware_state_updatestarted_unittest.cpp
+firmware_state_updatestarted_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la
+
 if BUILD_HOST_TOOL
 tools_bt_unittest_SOURCES = tools_bt_unittest.cpp
 tools_bt_unittest_LDADD = $(top_builddir)/tools/libupdater.la
diff --git a/test/firmware_state_notyetstarted_unittest.cpp b/test/firmware_state_notyetstarted_unittest.cpp
index f662820..bb6fecf 100644
--- a/test/firmware_state_notyetstarted_unittest.cpp
+++ b/test/firmware_state_notyetstarted_unittest.cpp
@@ -21,10 +21,6 @@
 
 class FirmwareHandlerNotYetStartedTest : public IpmiOnlyFirmwareStaticTest
 {
-  protected:
-    std::uint16_t session = 1;
-    std::uint16_t flags =
-        blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi;
 };
 
 /*
diff --git a/test/firmware_state_updatepending_unittest.cpp b/test/firmware_state_updatepending_unittest.cpp
index 7a1e480..87df67d 100644
--- a/test/firmware_state_updatepending_unittest.cpp
+++ b/test/firmware_state_updatepending_unittest.cpp
@@ -42,40 +42,6 @@
 
 class FirmwareHandlerUpdatePendingTest : public IpmiOnlyFirmwareStaticTest
 {
-  protected:
-    void getToUpdatePending()
-    {
-        /* The hash was not sent up, as it's technically optional.  Therefore,
-         * there is no active hash file.
-         */
-        EXPECT_CALL(imageMock, open(staticLayoutBlobId)).WillOnce(Return(true));
-        EXPECT_TRUE(handler->open(session, flags, staticLayoutBlobId));
-        expectedState(FirmwareBlobHandler::UpdateState::uploadInProgress);
-
-        EXPECT_CALL(imageMock, close()).WillRepeatedly(Return());
-        handler->close(session);
-        expectedState(FirmwareBlobHandler::UpdateState::verificationPending);
-
-        EXPECT_TRUE(handler->open(session, flags, verifyBlobId));
-        EXPECT_CALL(*verifyMockPtr, triggerVerification())
-            .WillOnce(Return(true));
-
-        EXPECT_TRUE(handler->commit(session, {}));
-        expectedState(FirmwareBlobHandler::UpdateState::verificationStarted);
-
-        EXPECT_CALL(*verifyMockPtr, checkVerificationState())
-            .WillOnce(Return(VerifyCheckResponses::success));
-        blobs::BlobMeta meta;
-        EXPECT_TRUE(handler->stat(session, &meta));
-        expectedState(FirmwareBlobHandler::UpdateState::verificationCompleted);
-
-        handler->close(session);
-        expectedState(FirmwareBlobHandler::UpdateState::updatePending);
-    }
-
-    std::uint16_t session = 1;
-    std::uint16_t flags =
-        blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi;
 };
 
 /*
diff --git a/test/firmware_state_updatestarted_unittest.cpp b/test/firmware_state_updatestarted_unittest.cpp
new file mode 100644
index 0000000..34e6666
--- /dev/null
+++ b/test/firmware_state_updatestarted_unittest.cpp
@@ -0,0 +1,82 @@
+/* The goal of these tests is to verify the behavior of all blob commands given
+ * the current state is updateStarted.  This state is achieved as an exit from
+ * updatePending.
+ */
+#include "firmware_handler.hpp"
+#include "firmware_unittest.hpp"
+#include "status.hpp"
+#include "util.hpp"
+
+#include <cstdint>
+#include <string>
+#include <vector>
+
+#include <gtest/gtest.h>
+
+namespace ipmi_flash
+{
+namespace
+{
+
+using ::testing::Return;
+
+/*
+ * There are the following calls (parameters may vary):
+ * canHandleBlob(blob)
+ * getBlobIds
+ * deleteBlob(blob)
+ * stat(blob)
+ * stat(session)
+ * open(blob)
+ * close(session)
+ * writemeta(session)
+ * write(session)
+ * read(session)
+ * commit(session)
+ */
+
+class FirmwareHandlerUpdateStartedTest : public IpmiOnlyFirmwareStaticTest
+{
+};
+
+/* canHandleBlob(blob)
+ * getBlobIds
+ */
+
+/*
+ * TODO: deleteBlob(blob)
+ */
+
+/*
+ * stat(blob)
+ */
+
+/*
+ * stat(session)
+ */
+/*
+ * open(blob)
+ */
+
+/*
+ * close(session)
+ */
+
+/*
+ * writemeta(session)
+ */
+
+/*
+ * write(session)
+ */
+
+/*
+ * read(session)
+ */
+
+/*
+ * commit(session)
+ */
+
+} // namespace
+} // namespace ipmi_flash
diff --git a/test/firmware_state_uploadinprogress_unittest.cpp b/test/firmware_state_uploadinprogress_unittest.cpp
index f33e547..5ed5491 100644
--- a/test/firmware_state_uploadinprogress_unittest.cpp
+++ b/test/firmware_state_uploadinprogress_unittest.cpp
@@ -41,17 +41,6 @@
  */
 class FirmwareHandlerUploadInProgressTest : public IpmiOnlyFirmwareStaticTest
 {
-  protected:
-    void openToInProgress(const std::string& blobId)
-    {
-        EXPECT_CALL(imageMock, open(blobId)).WillOnce(Return(true));
-        EXPECT_TRUE(handler->open(session, flags, blobId));
-        expectedState(FirmwareBlobHandler::UpdateState::uploadInProgress);
-    }
-
-    std::uint16_t session = 1;
-    std::uint16_t flags =
-        blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi;
 };
 
 TEST_F(FirmwareHandlerUploadInProgressTest, GetBlobIdsVerifyOutputActiveImage)
diff --git a/test/firmware_state_verificationcompleted_unittest.cpp b/test/firmware_state_verificationcompleted_unittest.cpp
index e82a011..f36427d 100644
--- a/test/firmware_state_verificationcompleted_unittest.cpp
+++ b/test/firmware_state_verificationcompleted_unittest.cpp
@@ -45,37 +45,6 @@
 class FirmwareHandlerVerificationCompletedTest
     : public IpmiOnlyFirmwareStaticTest
 {
-  protected:
-    void getToVerificationCompleted(VerifyCheckResponses checkResponse)
-    {
-        /* The hash was not sent up, as it's technically optional.  Therefore,
-         * there is no active hash file.
-         */
-        EXPECT_CALL(imageMock, open(staticLayoutBlobId)).WillOnce(Return(true));
-        EXPECT_TRUE(handler->open(session, flags, staticLayoutBlobId));
-        expectedState(FirmwareBlobHandler::UpdateState::uploadInProgress);
-
-        EXPECT_CALL(imageMock, close()).WillRepeatedly(Return());
-        handler->close(session);
-        expectedState(FirmwareBlobHandler::UpdateState::verificationPending);
-
-        EXPECT_TRUE(handler->open(session, flags, verifyBlobId));
-        EXPECT_CALL(*verifyMockPtr, triggerVerification())
-            .WillOnce(Return(true));
-
-        EXPECT_TRUE(handler->commit(session, {}));
-        expectedState(FirmwareBlobHandler::UpdateState::verificationStarted);
-
-        EXPECT_CALL(*verifyMockPtr, checkVerificationState())
-            .WillOnce(Return(checkResponse));
-        blobs::BlobMeta meta;
-        EXPECT_TRUE(handler->stat(session, &meta));
-        expectedState(FirmwareBlobHandler::UpdateState::verificationCompleted);
-    }
-
-    std::uint16_t session = 1;
-    std::uint16_t flags =
-        blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi;
 };
 
 /* TODO: deleteBlob(blob) */
diff --git a/test/firmware_state_verificationpending_unittest.cpp b/test/firmware_state_verificationpending_unittest.cpp
index 61b25c2..4452f17 100644
--- a/test/firmware_state_verificationpending_unittest.cpp
+++ b/test/firmware_state_verificationpending_unittest.cpp
@@ -44,21 +44,6 @@
 
 class FirmwareHandlerVerificationPendingTest : public IpmiOnlyFirmwareStaticTest
 {
-  protected:
-    void getToVerificationPending(const std::string& blobId)
-    {
-        EXPECT_CALL(imageMock, open(blobId)).WillOnce(Return(true));
-        EXPECT_TRUE(handler->open(session, flags, blobId));
-        expectedState(FirmwareBlobHandler::UpdateState::uploadInProgress);
-
-        EXPECT_CALL(imageMock, close()).WillRepeatedly(Return());
-        handler->close(session);
-        expectedState(FirmwareBlobHandler::UpdateState::verificationPending);
-    }
-
-    std::uint16_t session = 1;
-    std::uint16_t flags =
-        blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi;
 };
 
 /*
diff --git a/test/firmware_state_verificationstarted_unittest.cpp b/test/firmware_state_verificationstarted_unittest.cpp
index 1e73c98..9072ab9 100644
--- a/test/firmware_state_verificationstarted_unittest.cpp
+++ b/test/firmware_state_verificationstarted_unittest.cpp
@@ -42,28 +42,6 @@
 
 class FirmwareHandlerVerificationStartedTest : public IpmiOnlyFirmwareStaticTest
 {
-  protected:
-    void getToVerificationStarted(const std::string& blobId)
-    {
-        EXPECT_CALL(imageMock, open(blobId)).WillOnce(Return(true));
-        EXPECT_TRUE(handler->open(session, flags, blobId));
-        expectedState(FirmwareBlobHandler::UpdateState::uploadInProgress);
-
-        EXPECT_CALL(imageMock, close()).WillRepeatedly(Return());
-        handler->close(session);
-        expectedState(FirmwareBlobHandler::UpdateState::verificationPending);
-
-        EXPECT_TRUE(handler->open(session, flags, verifyBlobId));
-        EXPECT_CALL(*verifyMockPtr, triggerVerification())
-            .WillOnce(Return(true));
-
-        EXPECT_TRUE(handler->commit(session, {}));
-        expectedState(FirmwareBlobHandler::UpdateState::verificationStarted);
-    }
-
-    std::uint16_t session = 1;
-    std::uint16_t flags =
-        blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi;
 };
 
 /*
diff --git a/test/firmware_unittest.hpp b/test/firmware_unittest.hpp
index 0aa7e12..d49e9f5 100644
--- a/test/firmware_unittest.hpp
+++ b/test/firmware_unittest.hpp
@@ -14,6 +14,10 @@
 
 namespace ipmi_flash
 {
+namespace
+{
+
+using ::testing::Return;
 
 class IpmiOnlyFirmwareStaticTest : public ::testing::Test
 {
@@ -43,6 +47,63 @@
         EXPECT_EQ(state, realHandler->getCurrentState());
     }
 
+    void openToInProgress(const std::string& blobId)
+    {
+        EXPECT_CALL(imageMock, open(blobId)).WillOnce(Return(true));
+        EXPECT_TRUE(handler->open(session, flags, blobId));
+        expectedState(FirmwareBlobHandler::UpdateState::uploadInProgress);
+    }
+
+    void getToVerificationPending(const std::string& blobId)
+    {
+        openToInProgress(blobId);
+
+        EXPECT_CALL(imageMock, close()).WillRepeatedly(Return());
+        handler->close(session);
+        expectedState(FirmwareBlobHandler::UpdateState::verificationPending);
+    }
+
+    void getToVerificationStarted(const std::string& blobId)
+    {
+        getToVerificationPending(blobId);
+
+        EXPECT_TRUE(handler->open(session, flags, verifyBlobId));
+        EXPECT_CALL(*verifyMockPtr, triggerVerification())
+            .WillOnce(Return(true));
+
+        EXPECT_TRUE(handler->commit(session, {}));
+        expectedState(FirmwareBlobHandler::UpdateState::verificationStarted);
+    }
+
+    void getToVerificationCompleted(VerifyCheckResponses checkResponse)
+    {
+        getToVerificationStarted(staticLayoutBlobId);
+
+        EXPECT_CALL(*verifyMockPtr, checkVerificationState())
+            .WillOnce(Return(checkResponse));
+        blobs::BlobMeta meta;
+        EXPECT_TRUE(handler->stat(session, &meta));
+        expectedState(FirmwareBlobHandler::UpdateState::verificationCompleted);
+    }
+
+    void getToUpdatePending()
+    {
+        getToVerificationCompleted(VerifyCheckResponses::success);
+
+        handler->close(session);
+        expectedState(FirmwareBlobHandler::UpdateState::updatePending);
+    }
+
+    void getToUpdateStarted()
+    {
+        getToUpdatePending();
+        EXPECT_TRUE(handler->open(session, flags, updateBlobId));
+
+        EXPECT_CALL(*updateMockPtr, triggerUpdate()).WillOnce(Return(true));
+        EXPECT_TRUE(handler->commit(session, {}));
+        expectedState(FirmwareBlobHandler::UpdateState::updateStarted);
+    }
+
     ImageHandlerMock imageMock;
     std::vector<HandlerPack> blobs;
     std::vector<DataHandlerPack> data = {
@@ -50,6 +111,10 @@
     std::unique_ptr<blobs::GenericBlobInterface> handler;
     VerificationMock* verifyMockPtr;
     UpdateMock* updateMockPtr;
+
+    std::uint16_t session = 1;
+    std::uint16_t flags =
+        blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi;
 };
 
 class IpmiOnlyFirmwareTest : public ::testing::Test
@@ -96,4 +161,5 @@
     }
 };
 
+} // namespace
 } // namespace ipmi_flash
