bmc: move from data section objs to owned

Move from objects created ahead of purpose to owned objects.  This is a
step towards integrating with the json support.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I738a5edd40724f17245911af1080c350f029fef1
diff --git a/bmc/test/firmware_state_uploadinprogress_unittest.cpp b/bmc/test/firmware_state_uploadinprogress_unittest.cpp
index 63169db..72da8bb 100644
--- a/bmc/test/firmware_state_uploadinprogress_unittest.cpp
+++ b/bmc/test/firmware_state_uploadinprogress_unittest.cpp
@@ -121,7 +121,7 @@
      */
     openToInProgress(staticLayoutBlobId);
 
-    EXPECT_CALL(imageMock, getSize()).WillOnce(Return(32));
+    EXPECT_CALL(*imageMock2, getSize()).WillOnce(Return(32));
 
     blobs::BlobMeta meta, expectedMeta = {};
     expectedMeta.size = 32;
@@ -224,7 +224,8 @@
 {
     openToInProgress(staticLayoutBlobId);
     std::vector<std::uint8_t> bytes = {0x01, 0x02};
-    EXPECT_CALL(imageMock, write(0, ContainerEq(bytes))).WillOnce(Return(true));
+    EXPECT_CALL(*imageMock2, write(0, ContainerEq(bytes)))
+        .WillOnce(Return(true));
     EXPECT_TRUE(handler->write(session, 0, bytes));
 }
 
@@ -232,7 +233,8 @@
 {
     openToInProgress(hashBlobId);
     std::vector<std::uint8_t> bytes = {0x01, 0x02};
-    EXPECT_CALL(imageMock, write(0, ContainerEq(bytes))).WillOnce(Return(true));
+    EXPECT_CALL(*hashImageMock, write(0, ContainerEq(bytes)))
+        .WillOnce(Return(true));
     EXPECT_TRUE(handler->write(session, 0, bytes));
 }