Add test for reader writer