Unittest object to array