Test and fixes for equalsArray