EmrUtils { public static List<String> parseCsv(String csv) { List<String> values = new ArrayList<String>(); for (String token : csv.split(",")) { token = token.trim(); if (!StringUtils.isEmpty(token)) { values.add(token); } } return values; }  static boolean dateHasTime(Date date); static boolean isToday(Date date); static Integer whoStage(Concept c); static List<String> parseCsv(String csv); static List<Concept> parseConcepts(String csv); static Provider getProvider(User user);  }
@Test public void parseCsv_shouldParseCsv() { Assert.assertThat(EmrUtils.parseCsv("test"), contains("test")); Assert.assertThat(EmrUtils.parseCsv("1, 2,test"), contains("1", "2", "test")); Assert.assertThat(EmrUtils.parseCsv("1, 2,, , 3"), contains("1", "2", "3")); }