add tests for writable behaviour