Add simple read/write test case

I have added a simple write/read test which is failing for me. Either I'm using the API wrong, or there is a bug somewhere. Hope this is useful.