assertTrue(expression.isExpressionMatch(SECOND_PART + "w.hat.eve.r" + PART));
}
@Test
public void testMultipleFreeWildcards() throws Exception {
MailboxQuery expression = create(SECOND_PART + '*' + PART + '*'
+ SECOND_PART + "**");
assertTrue(expression.isExpressionMatch(SECOND_PART + PART
+ SECOND_PART));
assertTrue(expression.isExpressionMatch(SECOND_PART + '.' + PART + '.'
+ SECOND_PART));
assertTrue(expression.isExpressionMatch(SECOND_PART + "tosh.bosh"
+ PART + "tosh.bosh" + SECOND_PART + "boshtosh"));
assertFalse(expression.isExpressionMatch(SECOND_PART + '.'
+ PART.substring(1) + '.' + SECOND_PART));
assertTrue(expression.isExpressionMatch(SECOND_PART + '.'
+ PART.substring(1) + '.' + SECOND_PART + PART + '.'
+ SECOND_PART + "toshbosh"));
assertFalse(expression.isExpressionMatch(SECOND_PART + '.'
+ PART.substring(1) + '.' + SECOND_PART + PART + '.'
+ SECOND_PART.substring(1)));
assertTrue(expression.isExpressionMatch(SECOND_PART + "tosh.bosh"
+ PART + "tosh.bosh" + PART + SECOND_PART + "boshtosh" + PART
+ SECOND_PART));
assertFalse(expression.isExpressionMatch(SECOND_PART.substring(1)
+ "tosh.bosh" + PART + "tosh.bosh" + SECOND_PART
+ PART.substring(1) + SECOND_PART + "boshtosh" + PART
+ SECOND_PART.substring(1)));
}