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_sessionstat_unittest.cpp b/bmc/test/firmware_sessionstat_unittest.cpp
index dcb16d9..9623246 100644
--- a/bmc/test/firmware_sessionstat_unittest.cpp
+++ b/bmc/test/firmware_sessionstat_unittest.cpp
@@ -27,13 +27,13 @@
     /* Verifying running stat if the type of data session is IPMI returns no
      * metadata.
      */
-    EXPECT_CALL(imageMock, open("asdf")).WillOnce(Return(true));
+    EXPECT_CALL(*imageMock, open("asdf")).WillOnce(Return(true));
 
     EXPECT_TRUE(handler->open(
         0, blobs::OpenFlags::write | FirmwareFlags::UpdateFlags::ipmi, "asdf"));
 
     int size = 512;
-    EXPECT_CALL(imageMock, getSize()).WillOnce(Return(size));
+    EXPECT_CALL(*imageMock, getSize()).WillOnce(Return(size));
 
     blobs::BlobMeta meta;
     EXPECT_TRUE(handler->stat(0, &meta));
@@ -50,13 +50,13 @@
      * simply implementing read().
      */
     EXPECT_CALL(dataMock, open()).WillOnce(Return(true));
-    EXPECT_CALL(imageMock, open("asdf")).WillOnce(Return(true));
+    EXPECT_CALL(*imageMock, open("asdf")).WillOnce(Return(true));
 
     EXPECT_TRUE(handler->open(
         0, blobs::OpenFlags::write | FirmwareFlags::UpdateFlags::lpc, "asdf"));
 
     int size = 512;
-    EXPECT_CALL(imageMock, getSize()).WillOnce(Return(size));
+    EXPECT_CALL(*imageMock, getSize()).WillOnce(Return(size));
     std::vector<std::uint8_t> mBytes = {0x01, 0x02};
     EXPECT_CALL(dataMock, readMeta()).WillOnce(Return(mBytes));