So what is a Unit Test
public class StringSplitter
{
public ArrayList<String> splitString( String tags )
{
String regex = ",\\ *";
return splitStringUsingRegex(regex, tags);
}
private ArrayList<String> splitStringUsingRegex( String regex, String tags )
{
Pattern pp = Pattern.compile(regex);
String[] result = pp.split(tags.trim());
ArrayList<String> items = new ArrayList<>(Arrays.asList(result));
return items;
}
}