DescriptionUtils { public static void extractNominalValues(String description, Collection<String> target) { StringTokenizer tokenizer = new StringTokenizer(description, ","); while (tokenizer.hasMoreTokens()) { target.add(tokenizer.nextToken()); } } private  DescriptionUtils(); static String createNumericalDescription(double min, double max); static String createNominalDescription(Collection<String> values); static double[] extractNumericalRange(String description); static void extractNominalValues(String description,
                                          Collection<String> target);  }
@Test public void testExtractNominalValues() { String description = "val1,val2,val3"; Collection<String> target = new ArrayList<String>(); DescriptionUtils.extractNominalValues(description, target); assertEquals(3, target.size()); assertTrue("'val1 not found'", target.contains("val1")); assertTrue("'val2 not found'", target.contains("val2")); assertTrue("'val3 not found'", target.contains("val3")); }