Strings { public static String joinAndCamelize(Iterable<?> iterable) { StringBuilder sb = new StringBuilder(); boolean isFirst = true; for ( Object object : iterable ) { if ( !isFirst ) { sb.append( capitalize( object.toString() ) ); } else { sb.append( object ); isFirst = false; } } return sb.toString(); } 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 testJoinAndCamelize() { assertThat( Strings.joinAndCamelize( new ArrayList<String>() ) ).isEqualTo( "" ); assertThat( Strings.joinAndCamelize( Arrays.asList( "Hello", "World" ) ) ).isEqualTo( "HelloWorld" ); assertThat( Strings.joinAndCamelize( Arrays.asList( "Hello", "world" ) ) ).isEqualTo( "HelloWorld" ); assertThat( Strings.joinAndCamelize( Arrays.asList( "hello", "world" ) ) ).isEqualTo( "helloWorld" ); }