### Question:
StringUtils { public static List<String> getParameter(String list, String delimiter, String parameterName) { String[] parameters = null; if (list != null) { parameters = list.split(delimiter); } List<String> result = new ArrayList<String>(); if (parameters != null) { for (String parameter : parameters) { String[] valueParameterPair = parameter.split("="); final String currentParameterName = valueParameterPair[0]; if (currentParameterName != null) { if (parameterName.equals(currentParameterName.trim())) { if (valueParameterPair.length == 2) { result.add(valueParameterPair[1]); } } } } } return result; } private  StringUtils(); static String tagSwap(String content, Map<String, String> tagSwapMap); static String insertContent(String original, int position, String content); static List<String> getParameter(String list, String delimiter, String parameterName); static String ifNullOrEmpty(final String original, final String defaultString); static String encodeURIComponent(String component, String encoding); static boolean isEmpty(final String s); static boolean isBlank(final String s); static boolean isNotEmpty(final String s); static boolean isNotBlank(final String s); static boolean isAnyBlank(final Set<String> xs); static boolean isEqualTo(String s1, String s2); static boolean compareCaseInsensitiveString(String s1, String s2); static boolean contains(String s1, String s2); static boolean containsCaseInsensitive(String s1, String s2); static boolean startsWith(String s1, String s2); static boolean match(String value, String strPattern);  }### Answer:
@Test public void shouldReturnSingleValue() { assertThat(StringUtils.getParameter("a=1,b=4,c=5", ",", "b").size() == 1); }
@Test public void shouldReturnMulitpleValues() { assertThat(StringUtils.getParameter("a=1,b=4,c=5,b=6", ",", "b").size() == 2); }
@Test public void shouldReturnAnEmptyList() { assertThat(StringUtils.getParameter("a=1,b=,c=5", ",", "b").size() == 0); assertThat(StringUtils.getParameter("a=1,b,c=5", ",", "b").size() == 0); }