add unit test for kvstore