@Test public void findsMostLowercaseString() { Optional<String> result = StringExercises.mostLowercaseString(Arrays.asList("a", "abc", "ABCde")); assertEquals(result, Optional.of("abc")); }
public static Optional<String> mostLowercaseString(List<String> strings) { return strings.stream() .max(Comparator.comparing(StringExercises::countLowercaseLetters)); }
StringExercises { public static Optional<String> mostLowercaseString(List<String> strings) { return strings.stream() .max(Comparator.comparing(StringExercises::countLowercaseLetters)); } }
StringExercises { public static Optional<String> mostLowercaseString(List<String> strings) { return strings.stream() .max(Comparator.comparing(StringExercises::countLowercaseLetters)); }  }
StringExercises { public static Optional<String> mostLowercaseString(List<String> strings) { return strings.stream() .max(Comparator.comparing(StringExercises::countLowercaseLetters)); }  static int countLowercaseLetters(String string); static Optional<String> mostLowercaseString(List<String> strings); }
StringExercises { public static Optional<String> mostLowercaseString(List<String> strings) { return strings.stream() .max(Comparator.comparing(StringExercises::countLowercaseLetters)); }  static int countLowercaseLetters(String string); static Optional<String> mostLowercaseString(List<String> strings);  }