@Test void getFreeTextSeparators() { final HtmlTags tags = mock(HtmlTags.class); when(tags.getConfirmKeys()) .thenReturn(",") .thenReturn(", ") .thenReturn(null) .thenReturn("") .thenReturn("; ,"); assertThat(FreeTextSeparators.getFreeTextSeparators(tags)).containsExactly(","); assertThat(FreeTextSeparators.getFreeTextSeparators(tags)).containsExactly(",", " "); assertThat(FreeTextSeparators.getFreeTextSeparators(tags)).containsExactly(",", " "); assertThat(FreeTextSeparators.getFreeTextSeparators(tags)).containsExactly(",", " "); assertThat(FreeTextSeparators.getFreeTextSeparators(tags)).containsExactly(";", " ", ","); }
public static List<String> getFreeTextSeparators(HtmlTags tags) { final String confirmKeys = tags.getConfirmKeys(); if (StringUtils.isNotEmpty(confirmKeys)) { return Arrays.asList(confirmKeys.split("(?)")); } return Arrays.asList(",", " "); }
FreeTextSeparators { public static List<String> getFreeTextSeparators(HtmlTags tags) { final String confirmKeys = tags.getConfirmKeys(); if (StringUtils.isNotEmpty(confirmKeys)) { return Arrays.asList(confirmKeys.split("(?)")); } return Arrays.asList(",", " "); } }
FreeTextSeparators { public static List<String> getFreeTextSeparators(HtmlTags tags) { final String confirmKeys = tags.getConfirmKeys(); if (StringUtils.isNotEmpty(confirmKeys)) { return Arrays.asList(confirmKeys.split("(?)")); } return Arrays.asList(",", " "); }  }
FreeTextSeparators { public static List<String> getFreeTextSeparators(HtmlTags tags) { final String confirmKeys = tags.getConfirmKeys(); if (StringUtils.isNotEmpty(confirmKeys)) { return Arrays.asList(confirmKeys.split("(?)")); } return Arrays.asList(",", " "); }  static List<String> getFreeTextSeparators(HtmlTags tags); }
FreeTextSeparators { public static List<String> getFreeTextSeparators(HtmlTags tags) { final String confirmKeys = tags.getConfirmKeys(); if (StringUtils.isNotEmpty(confirmKeys)) { return Arrays.asList(confirmKeys.split("(?)")); } return Arrays.asList(",", " "); }  static List<String> getFreeTextSeparators(HtmlTags tags);  }