code for 'test_storage_write'