public void testRule() throws IOException {
JLanguageTool langTool = new JLanguageTool(new German());
// correct sentences:
assertEquals(0, langTool.check("Er ist nett. Er heißt Max.").size());
assertEquals(0, langTool.check("Außerdem kommt er. Ferner kommt sie. Außerdem kommt es.").size());
assertEquals(0, langTool.check("2011: Dieses passiert. 2011: Jenes passiert. 2011: Nicht passiert").size());
// errors:
assertEquals(1, langTool.check("Er ist nett. Er heißt Max. Er ist 11.").size());
assertEquals(1, langTool.check("Außerdem kommt er. Außerdem kommt sie.").size());
// this used to cause false alarms because reset() was not implemented
assertEquals(0, langTool.check("Außerdem ist das ein neuer Text.").size());