@Test public void passesBookExample() { Stream<String> names = Stream.of("John", "Paul", "George", "John", "Paul", "John"); Map<String, Long> counts = WordCount.countWords(names); assertEquals(3, counts.size()); assertEquals(Long.valueOf(3), counts.get("John")); assertEquals(Long.valueOf(2), counts.get("Paul")); assertEquals(Long.valueOf(1), counts.get("George")); }
public static Map<String, Long> countWords(Stream<String> names) { return Exercises.replaceThisWithSolution(); }
WordCount { public static Map<String, Long> countWords(Stream<String> names) { return Exercises.replaceThisWithSolution(); } }
WordCount { public static Map<String, Long> countWords(Stream<String> names) { return Exercises.replaceThisWithSolution(); }  }
WordCount { public static Map<String, Long> countWords(Stream<String> names) { return Exercises.replaceThisWithSolution(); }  static Map<String, Long> countWords(Stream<String> names); }
WordCount { public static Map<String, Long> countWords(Stream<String> names) { return Exercises.replaceThisWithSolution(); }  static Map<String, Long> countWords(Stream<String> names);  }