### Question:
QuerySettingsParser { protected List<String> normalizeListParam(List<String> paramValue) { if (paramValue == null || paramValue.isEmpty()) { return null; } List<String> ret = new ArrayList<String>(); for (String s : paramValue) { s = SearchUtils.trimToNull(s); if (s != null) { ret.add(s); } } if (ret.isEmpty()) return null; else return ret; }  QuerySettings parseUriParams(final MultivaluedMap<String, String> params);  }### Answer:
@Test public void normalizeListParam() { QuerySettingsParser tested = getTested(); Assert.assertNull(tested.normalizeListParam(null)); Assert.assertNull(tested.normalizeListParam(new ArrayList<String>())); Assert.assertNull(tested.normalizeListParam(Arrays.asList(""))); Assert.assertNull(tested.normalizeListParam(Arrays.asList("", " ", " \n \t"))); Assert.assertArrayEquals(new String[] { "ahoj" }, tested.normalizeListParam(Arrays.asList("", " ", "ahoj ")) .toArray()); Assert.assertArrayEquals(new String[] { "ahoj", "cao" }, tested.normalizeListParam(Arrays.asList("", " ", "ahoj ", "\tcao ")).toArray()); }