Added tested for as_array helper