Made explicit read only test
Modified test to write as well as read