HerdStringHelper { public Set<String> splitAndTrim(String string, String delimiter) { String[] tokens = string.split(delimiter); Set<String> resultSet = new HashSet<>(); for (String token : tokens) { if (StringUtils.isNotBlank(token)) { resultSet.add(token.trim()); } } return resultSet; }  List<String> splitStringWithDefaultDelimiter(String inputString); List<String> splitStringWithDefaultDelimiterEscaped(String inputString); String getRequiredConfigurationValue(ConfigurationValue configurationValue); int getConfigurationValueAsInteger(ConfigurationValue configurationValue); String getConfigurationValueAsString(ConfigurationValue configurationValue); Set<String> splitAndTrim(String string, String delimiter); String join(List<String> list, String delimiter, String escapeSequence); List<String> getDelimitedConfigurationValue(ConfigurationValue configurationValue); String buildStringWithDefaultDelimiter(List<String> inputStrings);  }
@Test public void testSplitAndTrim() { Set<String> expectedResults = new HashSet<>(Arrays.asList("a", "b", "c")); Set<String> actualResults = herdStringHelper.splitAndTrim(", \n\t\ra \n\t\r,,b,c,", ","); assertEquals("split and trim result", expectedResults, actualResults); }