add storage unittests for _write_data