### Question:
LowerCaseNormalizeCleaner implements Cleaner { public String clean(String value) { if (strip_accents) value = Normalizer.normalize(value, Normalizer.Form.NFD); char[] tmp = new char[value.length()]; int pos = 0; boolean prevws = false; for (int ix = 0; ix < tmp.length; ix++) { char ch = value.charAt(ix); if (ch == 0x030A && (value.charAt(ix - 1) == 'a' || value.charAt(ix - 1) == 'A')) { prevws = false; tmp[pos - 1] = '\u00E5'; continue; } if ((ch >= 0x0300 && ch <= 0x036F) || (ch >= 0x1DC0 && ch <= 0x1DFF) || (ch >= 0x20D0 && ch <= 0x20FF) || (ch >= 0xFE20 && ch <= 0xFE2F)) continue; if (ch != ' ' && ch != '\t' && ch != '\n' && ch != '\r' && ch != 0xA0 ) { if (prevws && pos != 0) tmp[pos++] = ' '; tmp[pos++] = Character.toLowerCase(ch); prevws = false; } else prevws = true; } return new String(tmp, 0, pos); }  void setStripAccents(boolean strip_accents); String clean(String value);  }### Answer:
@Test public void testEmpty() { assertEquals("", cleaner.clean("")); }
@Test public void testSingleChar() { assertEquals("a", cleaner.clean("A")); }
@Test public void testSingleChar2() { assertEquals("a", cleaner.clean("a")); }
@Test public void testSingleSpace() { assertEquals("", cleaner.clean(" ")); }
@Test public void testManySpaces() { assertEquals("", cleaner.clean(" ")); }
@Test public void testManyLeadingSpaces() { assertEquals("a", cleaner.clean(" a")); }
@Test public void testManyTrailingSpaces() { assertEquals("a", cleaner.clean("a ")); }
@Test public void testLarsMarius() { assertEquals("lars marius", cleaner.clean("Lars Marius")); }
@Test public void testLarsMarius3Spaces() { assertEquals("lars marius", cleaner.clean("Lars Marius")); }
@Test public void testLarsMariusPadded() { assertEquals("lars marius", cleaner.clean(" Lars Marius ")); }
@Test public void testRealData() { assertEquals("inger elisabeth foyn havre", cleaner.clean("Inger Elisabeth Foyn Havre")); }
@Test public void testAccentStripping() { assertEquals("male", cleaner.clean("Mal\u00E9")); }
@Test public void testAccentStripping2() { assertEquals("h\u00F8ybr\u00E5ten", cleaner.clean("H\u00F8ybr\u00E5ten")); }