Added mock that writes to kvstore