Strings { public static String join(Iterable<?> iterable, String separator) { return join( iterable, separator, null ); } private  Strings(); static String capitalize(String string); static String decapitalize(String string); static String join(Iterable<?> iterable, String separator); static String join(Iterable<T> iterable, String separator, Extractor<T, String> extractor); static String joinAndCamelize(Iterable<?> iterable); static boolean isEmpty(String string); static boolean isNotEmpty(String string); static String getSafeVariableName(String name, String... existingVariableNames); static String getSafeVariableName(String name, Collection<String> existingVariableNames); static String sanitizeIdentifierName(String identifier); static String stubPropertyName(String fullyQualifiedName); static String getMostSimilarWord(String word, Collection<String> similarWords);  }
@Test public void testJoin() { assertThat( Strings.join( new ArrayList<String>(), "-" ) ).isEqualTo( "" ); assertThat( Strings.join( Arrays.asList( "Hello", "World" ), "-" ) ).isEqualTo( "Hello-World" ); assertThat( Strings.join( Arrays.asList( "Hello" ), "-" ) ).isEqualTo( "Hello" ); }