### Question:
Palindrome { public boolean isPalindrome(String text) { String clean = text.replaceAll("\\s+", "").toLowerCase(); int length = clean.length(); int forward = 0; int backward = length - 1; while (backward > forward) { char forwardChar = clean.charAt(forward++); char backwardChar = clean.charAt(backward--); if (forwardChar != backwardChar) return false; } return true; }  boolean isPalindrome(String text); boolean isPalindromeReverseTheString(String text); boolean isPalindromeUsingStringBuilder(String text); boolean isPalindromeUsingStringBuffer(String text); boolean isPalindromeRecursive(String text); boolean isPalindromeUsingIntStream(String text);  }### Answer:
@Test public void whenWord_shouldBePalindrome() { for (String word : words) assertTrue(palindrome.isPalindrome(word)); }
@Test public void whenSentence_shouldBePalindrome() { for (String sentence : sentences) assertTrue(palindrome.isPalindrome(sentence)); }