@Test public void noStringReturnedForEmptyList() { assertFalse(com.insightfullogic.java8.answers.chapter3.StringExercises.mostLowercaseString(Collections.<String>emptyList()).isPresent()); }
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);  }