Add write test for varray