test: use common test object

Many tests only set up an IPMI data handler, or one with LPC in
addition, therefore this code can be more easily managed in one
location.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ie42a74d59bbd74c077c3cf7794546c71e92d2ef7
diff --git a/test/firmware_close_unittest.cpp b/test/firmware_close_unittest.cpp
index f7f729a..2b40d6d 100644
--- a/test/firmware_close_unittest.cpp
+++ b/test/firmware_close_unittest.cpp
@@ -1,5 +1,6 @@
 #include "data_mock.hpp"
 #include "firmware_handler.hpp"
+#include "firmware_unittest.hpp"
 #include "image_mock.hpp"
 #include "util.hpp"
 #include "verification_mock.hpp"
@@ -16,28 +17,8 @@
 using ::testing::Return;
 using ::testing::StrEq;
 
-class FirmwareHandlerCloseTest : public ::testing::Test
+class FirmwareHandlerCloseTest : public FakeLpcFirmwareTest
 {
-  protected:
-    DataHandlerMock dataMock;
-    ImageHandlerMock imageMock;
-
-    std::vector<HandlerPack> blobs = {
-        {hashBlobId, &imageMock},
-        {"asdf", &imageMock},
-    };
-    std::vector<DataHandlerPack> data = {
-        {FirmwareBlobHandler::UpdateFlags::ipmi, nullptr},
-        {FirmwareBlobHandler::UpdateFlags::lpc, &dataMock},
-    };
-
-    std::unique_ptr<GenericBlobInterface> handler;
-
-    void SetUp() override
-    {
-        handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
-            blobs, data, CreateVerifyMock());
-    }
 };
 
 TEST_F(FirmwareHandlerCloseTest, CloseSucceedsWithDataHandler)