Strings { public static String kebabToCamelCase(String str) { final AtomicBoolean first = new AtomicBoolean(true); return str != null && str.contains("-") ? Arrays.stream(str.split("-")) .map(s -> first.getAndSet(false) ? s : Strings.uppercaseFirst(s)).collect(Collectors.joining()) : str; }  static boolean isNotNullOrEmpty(String str); static boolean isNullOrEmpty(String str); static String join(final Object[] array); static String join(final Object[] array, final char separator); static String uppercaseFirst(String str); static String lowerFirst(String str); static String kebabToCamelCase(String str); static String read(Path path); static String read(InputStream is);  }
@Test public void shloudConvertToCamelCase() throws Exception { assertNull(Strings.kebabToCamelCase(null)); assertEquals("", Strings.kebabToCamelCase("")); assertEquals("my", Strings.kebabToCamelCase("my")); assertEquals("myString", Strings.kebabToCamelCase("my-string")); assertEquals("myOtherString", Strings.kebabToCamelCase("my-other-string")); }