binarystore: Implement open/close

Opening a blob will either have read flag for read only access, or
read|write flag for read/write access. When opening a supported path if
the blob doesn't exist yet, the handler will create an empty blob.

Signed-off-by: Kun Yi <kunyi@google.com>
Change-Id: I3d2c5b761227b77cda8bbc6fa66515e9921c066c
diff --git a/binarystore_mock.hpp b/binarystore_mock.hpp
index eae08fe..34bec6a 100644
--- a/binarystore_mock.hpp
+++ b/binarystore_mock.hpp
@@ -21,6 +21,11 @@
             .WillByDefault(Invoke(&real_store_, &BinaryStore::getBaseBlobId));
         ON_CALL(*this, getBlobIds)
             .WillByDefault(Invoke(&real_store_, &BinaryStore::getBlobIds));
+        ON_CALL(*this, openOrCreateBlob)
+            .WillByDefault(
+                Invoke(&real_store_, &BinaryStore::openOrCreateBlob));
+        ON_CALL(*this, close)
+            .WillByDefault(Invoke(&real_store_, &BinaryStore::close));
     }
     MOCK_CONST_METHOD0(getBaseBlobId, std::string());
     MOCK_CONST_METHOD0(getBlobIds, std::vector<std::string>());