/**
* Tests for similarMatching.
*/
@Test
public final void testSimilarMatching() {
final ExpressionMatcher matcher = new SimilarExprMatcher();
final Expression e1 = new Expression("aBc", "VER");
final Expression e2 = new Expression("abc", "VER");
final Expression e3 = new Expression("ab", "VER");
final Expression e4 = new Expression("abc", "SUB");
final Expression e5 = new Expression("X", "SUB");
assertTrue(matcher.match(e1, e2));
assertFalse(matcher.match(e1, e3));
assertTrue(matcher.match(e1, e4));
assertFalse(matcher.match(e1, e5));
assertFalse(matcher.match(e4, e5));
final Expression e6 = new Expression("hello", "VER");
final Expression e7 = new Expression("hallo", "VER");
final Expression e8 = new Expression("hailo", "VER");
assertTrue(matcher.match(e6, e7));
assertFalse(matcher.match(e6, e8));
assertTrue(matcher.match(e7, e8));
}