Refactoring tests for array setters