TextUtil { public static Stream<String> wordsOf(String text) { requireNonNull(text); return WORDS.splitAsStream(text); } private  TextUtil(); static Stream<String> wordsOf(String text); static String formatTextBox(String text, int width); static String formatTextBox(String text, int width, Pattern splitter, Set<String> singleRowers); static String formatJavaDocBox(String text); static String alignCenter(String substring, int totalWidth); static String alignCenter(String substring, int totalWidth, char fill); static String alignLeft(String substring, int totalWidth); static String alignLeft(String substring, int totalWidth, char fill); static String alignRight(String substring, int totalWidth); static String alignRight(String substring, int totalWidth, char fill);  }
@Test void testWordsOf() { final String text = Stream.of(TEXT_ARRAY).collect(Collectors.joining(" ")); final List<String> expResult = Stream.of(TEXT_ARRAY).collect(toList()); final List<String> result = TextUtil.wordsOf(text).collect(toList()); assertEquals(expResult, result); }