james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1131466 [2/2] - in /james/mailbox/trunk/store/src: main/java/org/apache/james/mailbox/store/mail/ main/java/org/apache/james/mailbox/store/search/ main/java/org/apache/james/mailbox/store/search/comparator/ test/java/org/apache/james/mailb...
Date Sat, 04 Jun 2011 18:58:52 GMT
Modified: james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/SearchUtilsTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/SearchUtilsTest.java?rev=1131466&r1=1131465&r2=1131466&view=diff
==============================================================================
--- james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/SearchUtilsTest.java (original)
+++ james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/SearchUtilsTest.java Sat Jun  4 18:58:51 2011
@@ -37,6 +37,8 @@ import org.apache.james.mailbox.store.ma
 import org.apache.james.mailbox.store.search.MessageSearches;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class SearchUtilsTest {
 
@@ -58,10 +60,9 @@ public class SearchUtilsTest {
 
     MessageBuilder builder;
 
-    MessageSearches searches;
-
     Collection<Long> recent;
-
+    private Logger log = LoggerFactory.getLogger(getClass());
+    
     private Calendar getGMT() {
         return Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.UK);
     }
@@ -76,64 +77,63 @@ public class SearchUtilsTest {
         recent = new ArrayList<Long>();
         builder = new MessageBuilder();
         builder.uid = 1009;
-        searches = new MessageSearches();
     }
     
     @Test
     public void testMatchSizeLessThan() throws Exception {
         builder.size = SIZE;
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.sizeLessThan(SIZE - 1), row,
-                recent));
-        assertFalse(searches.isMatch(SearchQuery.sizeLessThan(SIZE), row,
-                recent));
-        assertTrue(searches.isMatch(SearchQuery.sizeLessThan(SIZE + 1), row,
-                recent));
-        assertTrue(searches.isMatch(
-                SearchQuery.sizeLessThan(Integer.MAX_VALUE), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.sizeLessThan(SIZE - 1), row,
+                recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.sizeLessThan(SIZE), row,
+                recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.sizeLessThan(SIZE + 1), row,
+                recent, log));
+        assertTrue(MessageSearches.isMatch(
+                SearchQuery.sizeLessThan(Integer.MAX_VALUE), row, recent, log));
     }
 
     @Test
     public void testMatchSizeMoreThan() throws Exception {
         builder.size = SIZE;
         Message<Long> row = builder.build();
-        assertTrue(searches.isMatch(SearchQuery.sizeGreaterThan(SIZE - 1), row,
-                recent));
-        assertFalse(searches.isMatch(SearchQuery.sizeGreaterThan(SIZE), row,
-                recent));
-        assertFalse(searches.isMatch(SearchQuery.sizeGreaterThan(SIZE + 1),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .sizeGreaterThan(Integer.MAX_VALUE), row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.sizeGreaterThan(SIZE - 1), row,
+                recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.sizeGreaterThan(SIZE), row,
+                recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.sizeGreaterThan(SIZE + 1),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .sizeGreaterThan(Integer.MAX_VALUE), row, recent, log));
     }
 
     @Test
     public void testMatchSizeEquals() throws Exception {
         builder.size = SIZE;
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.sizeEquals(SIZE - 1), row,
-                recent));
-        assertTrue(searches.isMatch(SearchQuery.sizeEquals(SIZE), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.sizeEquals(SIZE + 1), row,
-                recent));
-        assertFalse(searches.isMatch(SearchQuery.sizeEquals(Integer.MAX_VALUE),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.sizeEquals(SIZE - 1), row,
+                recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.sizeEquals(SIZE), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.sizeEquals(SIZE + 1), row,
+                recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.sizeEquals(Integer.MAX_VALUE),
+                row, recent, log));
     }
 
     @Test
     public void testMatchInternalDateEquals() throws Exception {
         builder.internalDate = SUN_SEP_9TH_2001;
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2000), DateResolution.Day),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.internalDateOn(getDate(8, 9, 2001), DateResolution.Day),
-                row, recent));
-        assertTrue(searches.isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2001), DateResolution.Day),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.internalDateOn(getDate(10, 9, 2001), DateResolution.Day),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2002), DateResolution.Day),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2000), DateResolution.Day),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateOn(getDate(8, 9, 2001), DateResolution.Day),
+                row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2001), DateResolution.Day),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateOn(getDate(10, 9, 2001), DateResolution.Day),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2002), DateResolution.Day),
+                row, recent, log));
     }
 
     
@@ -141,407 +141,407 @@ public class SearchUtilsTest {
     public void testMatchInternalDateBefore() throws Exception {
         builder.internalDate = SUN_SEP_9TH_2001;
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(
-                SearchQuery.internalDateBefore(getDate(9, 9, 2000), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.internalDateBefore(getDate(8, 9, 2001), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.internalDateBefore(getDate(9, 9, 2001), DateResolution.Day), row, recent));
-        assertTrue(searches.isMatch(
-                SearchQuery.internalDateBefore(getDate(10, 9, 2001), DateResolution.Day), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.internalDateBefore(getDate(9, 9, 2002), DateResolution.Day),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.internalDateBefore(getDate(9, 9, 2000), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.internalDateBefore(getDate(8, 9, 2001), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.internalDateBefore(getDate(9, 9, 2001), DateResolution.Day), row, recent, log));
+        assertTrue(MessageSearches.isMatch(
+                SearchQuery.internalDateBefore(getDate(10, 9, 2001), DateResolution.Day), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.internalDateBefore(getDate(9, 9, 2002), DateResolution.Day),
+                row, recent, log));
     }
 
     @Test
     public void testMatchInternalDateAfter() throws Exception {
         builder.internalDate = SUN_SEP_9TH_2001;
         Message<Long> row = builder.build();
-        assertTrue(searches.isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2000), DateResolution.Day),
-                row, recent));
-        assertTrue(searches.isMatch(SearchQuery.internalDateAfter(getDate(8, 9, 2001), DateResolution.Day),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2001), DateResolution.Day),
-                row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.internalDateAfter(getDate(10, 9, 2001), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2002), DateResolution.Day),
-                row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2000), DateResolution.Day),
+                row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.internalDateAfter(getDate(8, 9, 2001), DateResolution.Day),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2001), DateResolution.Day),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.internalDateAfter(getDate(10, 9, 2001), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2002), DateResolution.Day),
+                row, recent, log));
     }
 
     @Test
     public void testMatchHeaderDateAfter() throws Exception {
         builder.header(DATE_FIELD, RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertTrue(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
-                9, 2000), DateResolution.Day), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
-                9, 2001), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
-                9, 2001), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
-                getDate(10, 9, 2001), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
-                9, 2002), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
-                2001), DateResolution.Day), row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+                9, 2000), DateResolution.Day), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
+                9, 2001), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+                9, 2001), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
+                getDate(10, 9, 2001), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+                9, 2002), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
+                2001), DateResolution.Day), row, recent, log));
     }
 
     @Test
     public void testShouldMatchCapsHeaderDateAfter() throws Exception {
         builder.header(DATE_FIELD.toUpperCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertTrue(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
-                9, 2000), DateResolution.Day), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
-                9, 2001), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
-                9, 2001), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
-                getDate(10, 9, 2001), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
-                9, 2002), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
-                2001), DateResolution.Day), row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+                9, 2000), DateResolution.Day), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
+                9, 2001), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+                9, 2001), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
+                getDate(10, 9, 2001), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+                9, 2002), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
+                2001), DateResolution.Day), row, recent, log));
     }
 
     @Test
     public void testShouldMatchLowersHeaderDateAfter() throws Exception {
         builder.header(DATE_FIELD.toLowerCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertTrue(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
-                9, 2000), DateResolution.Day), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
-                9, 2001),DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
-                9, 2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
-                getDate(10, 9, 2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
-                9, 2002), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
-                2001), DateResolution.Day),row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+                9, 2000), DateResolution.Day), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
+                9, 2001),DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+                9, 2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
+                getDate(10, 9, 2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+                9, 2002), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
+                2001), DateResolution.Day),row, recent, log));
     }
 
     @Test
     public void testMatchHeaderDateOn() throws Exception {
         builder.header(DATE_FIELD, RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
-                2000), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(8, 9,
-                2001), DateResolution.Day),row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
-                2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(10,
-                9, 2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
-                2002), DateResolution.Day), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
-                2001), DateResolution.Day), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+                2000), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(8, 9,
+                2001), DateResolution.Day),row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+                2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(10,
+                9, 2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+                2002), DateResolution.Day), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
+                2001), DateResolution.Day), row, recent, log));
     }
 
     @Test
     public void testShouldMatchCapsHeaderDateOn() throws Exception {
         builder.header(DATE_FIELD.toUpperCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
-                2000), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(8, 9,
-                2001), DateResolution.Day),row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
-                2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(10,
-                9, 2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
-                2002), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
-                2001), DateResolution.Day),row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+                2000), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(8, 9,
+                2001), DateResolution.Day),row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+                2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(10,
+                9, 2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+                2002), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
+                2001), DateResolution.Day),row, recent, log));
     }
 
     @Test
     public void testShouldMatchLowersHeaderDateOn() throws Exception {
         builder.header(DATE_FIELD.toLowerCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
-                2000), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(8, 9,
-                2001), DateResolution.Day),row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
-                2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(10,
-                9, 2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
-                2002), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
-                2001), DateResolution.Day),row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+                2000), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(8, 9,
+                2001), DateResolution.Day),row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+                2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(10,
+                9, 2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+                2002), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
+                2001), DateResolution.Day),row, recent, log));
     }
 
     @Test
     public void testMatchHeaderDateBefore() throws Exception {
         builder.header(DATE_FIELD.toLowerCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(9, 9, 2000), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(8, 9, 2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(9, 9, 2001), DateResolution.Day),row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(10, 9, 2001), DateResolution.Day),row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
-                9, 2002), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
-                9, 2001), DateResolution.Day),row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(9, 9, 2000), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(8, 9, 2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(9, 9, 2001), DateResolution.Day),row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(10, 9, 2001), DateResolution.Day),row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
+                9, 2002), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
+                9, 2001), DateResolution.Day),row, recent, log));
     }
 
     @Test
     public void testShouldMatchCapsHeaderDateBefore() throws Exception {
         builder.header(DATE_FIELD.toLowerCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(9, 9, 2000), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(8, 9, 2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(9, 9, 2001), DateResolution.Day),row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(10, 9, 2001), DateResolution.Day),row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
-                9, 2002), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
-                9, 2001), DateResolution.Day),row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(9, 9, 2000), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(8, 9, 2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(9, 9, 2001), DateResolution.Day),row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(10, 9, 2001), DateResolution.Day),row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
+                9, 2002), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
+                9, 2001), DateResolution.Day),row, recent, log));
     }
 
     @Test
     public void testShouldMatchLowersHeaderDateBefore() throws Exception {
         builder.header(DATE_FIELD.toLowerCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(9, 9, 2000), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(8, 9, 2001), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(9, 9, 2001), DateResolution.Day),row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
-                getDate(10, 9, 2001), DateResolution.Day),row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
-                9, 2002), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
-                9, 2001), DateResolution.Day),row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(9, 9, 2000), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(8, 9, 2001), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(9, 9, 2001), DateResolution.Day),row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+                getDate(10, 9, 2001), DateResolution.Day),row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
+                9, 2002), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
+                9, 2001), DateResolution.Day),row, recent, log));
     }
 
     @Test
     public void testMatchHeaderContainsCaps() throws Exception {
         builder.header(SUBJECT_FIELD, TEXT.toUpperCase());
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerContains(DATE_FIELD,
-                CUSTARD), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerContains(DATE_FIELD,
-                TEXT), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                TEXT), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                RHUBARD), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                CUSTARD), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+                CUSTARD), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+                TEXT), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                TEXT), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                RHUBARD), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                CUSTARD), row, recent, log));
     }
 
     @Test
     public void testMatchHeaderContainsLowers() throws Exception {
         builder.header(SUBJECT_FIELD, TEXT.toUpperCase());
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerContains(DATE_FIELD,
-                CUSTARD), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerContains(DATE_FIELD,
-                TEXT), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                TEXT), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                RHUBARD), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                CUSTARD), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+                CUSTARD), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+                TEXT), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                TEXT), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                RHUBARD), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                CUSTARD), row, recent, log));
     }
 
     @Test
     public void testMatchHeaderContains() throws Exception {
         builder.header(SUBJECT_FIELD, TEXT.toUpperCase());
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerContains(DATE_FIELD,
-                CUSTARD), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerContains(DATE_FIELD,
-                TEXT), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                TEXT), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                RHUBARD), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                CUSTARD), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+                CUSTARD), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+                TEXT), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                TEXT), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                RHUBARD), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                CUSTARD), row, recent, log));
     }
 
     @Test
     public void testShouldMatchLowerHeaderContains() throws Exception {
         builder.header(SUBJECT_FIELD.toLowerCase(), TEXT);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerContains(DATE_FIELD,
-                CUSTARD), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerContains(DATE_FIELD,
-                TEXT), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                TEXT), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                RHUBARD), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                CUSTARD), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+                CUSTARD), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+                TEXT), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                TEXT), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                RHUBARD), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                CUSTARD), row, recent, log));
     }
 
     @Test
     public void testShouldMatchCapsHeaderContains() throws Exception {
         builder.header(SUBJECT_FIELD.toUpperCase(), TEXT);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerContains(DATE_FIELD,
-                CUSTARD), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerContains(DATE_FIELD,
-                TEXT), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                TEXT), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                RHUBARD), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
-                CUSTARD), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+                CUSTARD), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+                TEXT), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                TEXT), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                RHUBARD), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+                CUSTARD), row, recent, log));
     }
 
     @Test
     public void testMatchHeaderExists() throws Exception {
         builder.header(SUBJECT_FIELD, TEXT);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerExists(DATE_FIELD), row,
-                recent));
-        assertTrue(searches.isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerExists(DATE_FIELD), row,
+                recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
+                row, recent, log));
     }
 
     @Test
     public void testShouldMatchLowersHeaderExists() throws Exception {
         builder.header(SUBJECT_FIELD.toLowerCase(), TEXT);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerExists(DATE_FIELD), row,
-                recent));
-        assertTrue(searches.isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerExists(DATE_FIELD), row,
+                recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
+                row, recent, log));
     }
 
     @Test
     public void testShouldMatchUppersHeaderExists() throws Exception {
         builder.header(SUBJECT_FIELD.toLowerCase(), TEXT);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerExists(DATE_FIELD), row,
-                recent));
-        assertTrue(searches.isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerExists(DATE_FIELD), row,
+                recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
+                row, recent, log));
     }
 
     @Test
     public void testShouldMatchUidRange() throws Exception {
         builder.setKey(1, 1729);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.uid(range(1, 1)), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.uid(range(1728, 1728)), row,
-                recent));
-        assertTrue(searches.isMatch(SearchQuery.uid(range(1729, 1729)), row,
-                recent));
-        assertFalse(searches.isMatch(SearchQuery.uid(range(1730, 1730)), row,
-                recent));
-        assertFalse(searches.isMatch(SearchQuery.uid(range(1, 1728)), row,
-                recent));
-        assertTrue(searches.isMatch(SearchQuery.uid(range(1, 1729)), row,
-                recent));
-        assertTrue(searches.isMatch(SearchQuery.uid(range(1729, 1800)), row,
-                recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .uid(range(1730, Long.MAX_VALUE)), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.uid(range(1730,
-                Long.MAX_VALUE, 1, 1728)), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.uid(range(1730, Long.MAX_VALUE,
-                1, 1729)), row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .uid(range(1, 1728, 1800, 1810)), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.uid(range(1, 1, 1729, 1729)),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.uid(range(1, 1, 1800, 1800)),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1, 1)), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1728, 1728)), row,
+                recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.uid(range(1729, 1729)), row,
+                recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1730, 1730)), row,
+                recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1, 1728)), row,
+                recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.uid(range(1, 1729)), row,
+                recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.uid(range(1729, 1800)), row,
+                recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .uid(range(1730, Long.MAX_VALUE)), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1730,
+                Long.MAX_VALUE, 1, 1728)), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.uid(range(1730, Long.MAX_VALUE,
+                1, 1729)), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .uid(range(1, 1728, 1800, 1810)), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.uid(range(1, 1, 1729, 1729)),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1, 1, 1800, 1800)),
+                row, recent, log));
     }
 
     @Test
     public void testShouldMatchSeenFlagSet() throws Exception {
         builder.setFlags(true, false, false, false, false, false);
         Message<Long> row = builder.build();
-        assertTrue(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
-                row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
-                row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+                row, recent, log));
     }
 
     @Test
     public void testShouldMatchAnsweredFlagSet() throws Exception {
         builder.setFlags(false, false, true, false, false, false);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
-                row, recent));
-        assertTrue(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.ANSWERED),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+                row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.ANSWERED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+                row, recent, log));
     }
 
     @Test
     public void testShouldMatchFlaggedFlagSet() throws Exception {
         builder.setFlags(false, true, false, false, false, false);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
-                row, recent));
-        assertTrue(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
-                row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+                row, recent, log));
     }
 
     @Test
     public void testShouldMatchDraftFlagSet() throws Exception {
         builder.setFlags(false, false, false, true, false, false);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
-                row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+                row, recent, log));
     }
 
     
@@ -549,18 +549,18 @@ public class SearchUtilsTest {
     public void testShouldMatchDeletedFlagSet() throws Exception {
         builder.setFlags(false, false, false, false, true, false);
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
-                row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertTrue(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+                row, recent, log));
     }
 
     @Test
@@ -568,18 +568,18 @@ public class SearchUtilsTest {
         builder.setFlags(false, false, false, false, false, false);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
-                row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
-                row, recent));
-        assertTrue(searches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+                row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+                row, recent, log));
     }
 
     @Test
@@ -587,18 +587,18 @@ public class SearchUtilsTest {
         builder.setFlags(false, true, true, true, true, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertTrue(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.FLAGGED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.DELETED), row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent, log));
     }
 
     @Test
@@ -606,18 +606,18 @@ public class SearchUtilsTest {
         builder.setFlags(true, true, false, true, true, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertFalse(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.FLAGGED), row, recent));
-        assertTrue(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.DELETED), row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent, log));
     }
 
     @Test
@@ -625,18 +625,18 @@ public class SearchUtilsTest {
         builder.setFlags(true, false, true, true, true, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertFalse(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
-                row, recent));
-        assertTrue(searches.isMatch(
-                SearchQuery.flagIsUnSet(Flags.Flag.FLAGGED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.DELETED), row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertTrue(MessageSearches.isMatch(
+                SearchQuery.flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent, log));
     }
 
     @Test
@@ -644,18 +644,18 @@ public class SearchUtilsTest {
         builder.setFlags(true, true, true, false, true, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertFalse(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.FLAGGED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.DELETED), row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent, log));
     }
 
     @Test
@@ -663,18 +663,18 @@ public class SearchUtilsTest {
         builder.setFlags(true, true, true, true, false, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertFalse(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.FLAGGED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertTrue(searches.isMatch(
-                SearchQuery.flagIsUnSet(Flags.Flag.DELETED), row, recent));
-        assertFalse(searches.isMatch(
-                SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertTrue(MessageSearches.isMatch(
+                SearchQuery.flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(
+                SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent, log));
     }
 
     @Test
@@ -682,61 +682,61 @@ public class SearchUtilsTest {
         builder.setFlags(true, true, true, true, true, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid() + 1));
-        assertFalse(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.FLAGGED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
-                row, recent));
-        assertFalse(searches.isMatch(SearchQuery
-                .flagIsUnSet(Flags.Flag.DELETED), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.RECENT),
-                row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+                row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
+                .flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.RECENT),
+                row, recent, log));
     }
 
     @Test
     public void testShouldMatchAll() throws Exception {
         Message<Long> row = builder.build();
-        assertTrue(searches.isMatch(SearchQuery.all(), row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.all(), row, recent, log));
     }
 
     @Test
     public void testShouldMatchNot() throws Exception {
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.not(SearchQuery.all()), row,
-                recent));
-        assertTrue(searches.isMatch(SearchQuery.not(SearchQuery
-                .headerExists(DATE_FIELD)), row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.not(SearchQuery.all()), row,
+                recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.not(SearchQuery
+                .headerExists(DATE_FIELD)), row, recent, log));
     }
 
     @Test
     public void testShouldMatchOr() throws Exception {
         Message<Long> row = builder.build();
-        assertTrue(searches.isMatch(SearchQuery.or(SearchQuery.all(),
-                SearchQuery.headerExists(DATE_FIELD)), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.or(SearchQuery
-                .headerExists(DATE_FIELD), SearchQuery.all()), row, recent));
-        assertFalse(searches.isMatch(SearchQuery
+        assertTrue(MessageSearches.isMatch(SearchQuery.or(SearchQuery.all(),
+                SearchQuery.headerExists(DATE_FIELD)), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.or(SearchQuery
+                .headerExists(DATE_FIELD), SearchQuery.all()), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
                 .or(SearchQuery.headerExists(DATE_FIELD), SearchQuery
-                        .headerExists(DATE_FIELD)), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.or(SearchQuery.all(),
-                SearchQuery.all()), row, recent));
+                        .headerExists(DATE_FIELD)), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.or(SearchQuery.all(),
+                SearchQuery.all()), row, recent, log));
     }
 
     @Test
     public void testShouldMatchAnd() throws Exception {
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.and(SearchQuery.all(),
-                SearchQuery.headerExists(DATE_FIELD)), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.and(SearchQuery
-                .headerExists(DATE_FIELD), SearchQuery.all()), row, recent));
-        assertFalse(searches.isMatch(SearchQuery
+        assertFalse(MessageSearches.isMatch(SearchQuery.and(SearchQuery.all(),
+                SearchQuery.headerExists(DATE_FIELD)), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.and(SearchQuery
+                .headerExists(DATE_FIELD), SearchQuery.all()), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery
                 .and(SearchQuery.headerExists(DATE_FIELD), SearchQuery
-                        .headerExists(DATE_FIELD)), row, recent));
-        assertTrue(searches.isMatch(SearchQuery.and(SearchQuery.all(),
-                SearchQuery.all()), row, recent));
+                        .headerExists(DATE_FIELD)), row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.and(SearchQuery.all(),
+                SearchQuery.all()), row, recent, log));
     }
     
     private SearchQuery.NumericRange[] range(long low, long high) {
@@ -758,13 +758,13 @@ public class SearchUtilsTest {
     public void testMatchHeaderDateOnWithOffset() throws Exception {
         builder.header(DATE_FIELD, "Mon, 26 Mar 2007 00:00:00 +0300");
         Message<Long> row = builder.build();
-        assertTrue(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(26, 3,
-                2007), DateResolution.Day),row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(26, 3,
+                2007), DateResolution.Day),row, recent, log));
         
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(25, 3,
-                2007), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(27, 3,
-                2007), DateResolution.Day),row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(25, 3,
+                2007), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(27, 3,
+                2007), DateResolution.Day),row, recent, log));
     }
     
 
@@ -772,34 +772,34 @@ public class SearchUtilsTest {
     public void testShouldMatchHeaderDateBeforeWithOffset() throws Exception {
         builder.header(DATE_FIELD, "Mon, 26 Mar 2007 00:00:00 +0300");
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(26, 3,
-                2007), DateResolution.Day),row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(26, 3,
+                2007), DateResolution.Day),row, recent, log));
         
-        assertTrue(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(27, 3,
-                2007), DateResolution.Day),row, recent));
-        assertFalse(searches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(25, 3,
-                2007), DateResolution.Day),row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(27, 3,
+                2007), DateResolution.Day),row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(25, 3,
+                2007), DateResolution.Day),row, recent, log));
     }
 
     @Test
     public void testShouldMatchHeaderDateAfterWithOffset() throws Exception {
         builder.header(DATE_FIELD, "Mon, 26 Mar 2007 00:00:00 +0300");
         Message<Long> row = builder.build();
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(26, 3,
-                2007), DateResolution.Day),row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(26, 3,
+                2007), DateResolution.Day),row, recent, log));
         
-        assertFalse(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(27, 3,
-                2007), DateResolution.Day),row, recent));
-        assertTrue(searches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(25, 3,
-                2007), DateResolution.Day),row, recent));
+        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(27, 3,
+                2007), DateResolution.Day),row, recent, log));
+        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(25, 3,
+                2007), DateResolution.Day),row, recent, log));
     }
     
     @Test
     public void testShouldMatchAddressHeaderWithComments() throws Exception {
         builder.header("To", "<user-from (comment)@ (comment) domain.org>");
         Message<Long> row = builder.build();
-        assertTrue(searches.isMatch(SearchQuery.address(AddressType.To, "user-from@domain.org"), row, recent));
-        assertFalse(searches.isMatch(SearchQuery.address(AddressType.From, "user-from@domain.org"), row, recent));
+        assertTrue(MessageSearches.isMatch(SearchQuery.address(AddressType.To, "user-from@domain.org"), row, recent, log));
+        assertFalse(MessageSearches.isMatch(SearchQuery.address(AddressType.From, "user-from@domain.org"), row, recent, log));
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message