TDD method to determine whether an array is a palindrome