StringFilter implements Serializable { public String filterCharsAndShortWords(String value, List<Character> charsToFilter, int wordToRemoveMaxLength) { String filteredValue = value; filteredValue = filterChars(filteredValue, charsToFilter); filteredValue = filterShortWords(filteredValue, wordToRemoveMaxLength); return filteredValue; }  String filterCharsAndShortWords(String value, List<Character> charsToFilter, int wordToRemoveMaxLength); String filterChars(String value, List<Character> charsToFilter); String filterShortWords(String value, int wordToRemoveMaxLength);  }
@Test public void filterCharsAndShortWords() { assertEquals("abcd cde", stringFilter.filterCharsAndShortWords("abcd, bc cde, fg h", ImmutableList.of(','), 2)); }