Add test for objectstore

Add remove then write object in a transaction.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>