@Test
public void returns_CorrectTopTopics() throws Exception
{
final Set<Noun> expected = newSet(//@formatter:off
topTopic(topic("widow", 12), new PolarityResult(of(Polarity.NEUTRAL, 0),of(Polarity.POSITIVE, .92),of(Polarity.POSITIVE, .95)),
of(OfferingGuidance.TO_SOME_EXTENT, 2),of(RequestingGuidance.NOT_AT_ALL, 1)),
topTopic(topic("Judge Thatcher", 12), of(Polarity.NEUTRAL, 0),
of(OfferingGuidance.TO_SOME_EXTENT, 2),of(RequestingGuidance.NOT_AT_ALL, 1), ner("Person", "female")),
topTopic(topic("Tom Sawyer", 9), of(Polarity.NEUTRAL, 0),
of(OfferingGuidance.NOT_AT_ALL, 1),of(RequestingGuidance.NOT_AT_ALL, 1), ner("Person", "male")),
topTopic(topic("Tom", 7), of(Polarity.NEUTRAL, 0),
of(OfferingGuidance.NOT_AT_ALL, 1),of(RequestingGuidance.NOT_AT_ALL, 1), ner("Person", "male")),
topTopic(topic("money", 6),new PolarityResult(of(Polarity.NEGATIVE, -.89),of(Polarity.NEGATIVE, -.89),of(Polarity.NEUTRAL, 0)),
of(OfferingGuidance.NOT_AT_ALL, 1),of(RequestingGuidance.NOT_AT_ALL, 1)));//@formatter:on
assertThat(topTopicsIn(textA), are(as(expected)));
}