public final void testTypeTriggerMatching() {
// First show, that "do" without the exactMatching flag matches "done".
Sentence m1 = ConversationParser.parseAsMatcher("done");
assertFalse(m1.hasError());
assertEquals("do/VER-PAS", m1.toString());
Expression e1 = m1.getTriggerExpression();
Sentence s = ConversationParser.parse("do");
assertFalse(s.hasError());
Expression e2 = s.getTriggerExpression();
assertTrue(e2.matchesNormalized(e1));
assertEquals("do/VER", s.toString());
// Using the typeMatching flag, it doesn't match any more...
m1 = ConversationParser.parseAsMatcher("|TYPE|done/VER-PAS");
assertFalse(m1.hasError());
assertEquals("|TYPE|done/VER-PAS", m1.toString());
e1 = m1.getTriggerExpression();
assertFalse(e2.matches(e1));
assertFalse(e2.matchesNormalized(e1));
// ...but "done" matches the given type string pattern.
s = ConversationParser.parse("done");
assertFalse(s.hasError());
assertEquals("do/VER-PAS", s.toString());
e2 = s.getTriggerExpression();
assertTrue(e2.matches(e1));
assertTrue(e2.matchesNormalized(e1));
}