### Question:
CreateCandidatesMapper implements MapFunction<ParsedWikiDocument, WikiDocumentOutput> { public static int calculateMax(Multiset<String> frequencies) { Entry<String> max = Collections.max(frequencies.entrySet(), (e1, e2) -> Integer.compare(e1.getCount(), e2.getCount())); return max.getCount(); } CreateCandidatesMapper(BaseConfig config); @Override WikiDocumentOutput map(ParsedWikiDocument doc); static List<Integer> identifierPositions(List<Word> sentence, String identifier); static int closestIdentifierPosition(List<Integer> positions, int wordIdx); static int calculateMax(Multiset<String> frequencies); static List<Sentence> findSentencesWithIdentifier(List<Sentence> sentences, String identifier);  }### Answer:
@Test public void calculateMaxFrequency() { Multiset<String> set = HashMultiset.create(Arrays.asList("a", "b", "c", "a", "a", "c")); int actual = CreateCandidatesMapper.calculateMax(set); assertEquals(3, actual); }