james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1417011 [2/2] - in /james/mailbox/trunk/store/src: main/java/org/apache/james/mailbox/store/search/ test/java/org/apache/james/mailbox/store/
Date Tue, 04 Dec 2012 16:11:08 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=1417011&r1=1417010&r2=1417011&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 Tue Dec  4 16:11:06 2012
@@ -83,13 +83,13 @@ public class SearchUtilsTest {
     public void testMatchSizeLessThan() throws Exception {
         builder.size = SIZE;
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.sizeLessThan(SIZE - 1), row,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.sizeLessThan(SIZE - 1), row,
                 recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.sizeLessThan(SIZE), row,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.sizeLessThan(SIZE), row,
                 recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.sizeLessThan(SIZE + 1), row,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.sizeLessThan(SIZE + 1), row,
                 recent, log));
-        assertTrue(MessageSearches.isMatch(
+        assertTrue(new MessageSearches().isMatch(
                 SearchQuery.sizeLessThan(Integer.MAX_VALUE), row, recent, log));
     }
 
@@ -97,13 +97,13 @@ public class SearchUtilsTest {
     public void testMatchSizeMoreThan() throws Exception {
         builder.size = SIZE;
         Message<Long> row = builder.build();
-        assertTrue(MessageSearches.isMatch(SearchQuery.sizeGreaterThan(SIZE - 1), row,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.sizeGreaterThan(SIZE - 1), row,
                 recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.sizeGreaterThan(SIZE), row,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.sizeGreaterThan(SIZE), row,
                 recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.sizeGreaterThan(SIZE + 1),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.sizeGreaterThan(SIZE + 1),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .sizeGreaterThan(Integer.MAX_VALUE), row, recent, log));
     }
 
@@ -111,12 +111,12 @@ public class SearchUtilsTest {
     public void testMatchSizeEquals() throws Exception {
         builder.size = SIZE;
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.sizeEquals(SIZE - 1), row,
+        assertFalse(new 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,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.sizeEquals(SIZE), row, recent, log));
+        assertFalse(new MessageSearches().isMatch(SearchQuery.sizeEquals(SIZE + 1), row,
                 recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.sizeEquals(Integer.MAX_VALUE),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.sizeEquals(Integer.MAX_VALUE),
                 row, recent, log));
     }
 
@@ -124,15 +124,15 @@ public class SearchUtilsTest {
     public void testMatchInternalDateEquals() throws Exception {
         builder.internalDate = SUN_SEP_9TH_2001;
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2000), DateResolution.Day),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2000), DateResolution.Day),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateOn(getDate(8, 9, 2001), DateResolution.Day),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.internalDateOn(getDate(8, 9, 2001), DateResolution.Day),
                 row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2001), DateResolution.Day),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2001), DateResolution.Day),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateOn(getDate(10, 9, 2001), DateResolution.Day),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.internalDateOn(getDate(10, 9, 2001), DateResolution.Day),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2002), DateResolution.Day),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.internalDateOn(getDate(9, 9, 2002), DateResolution.Day),
                 row, recent, log));
     }
 
@@ -141,15 +141,15 @@ public class SearchUtilsTest {
     public void testMatchInternalDateBefore() throws Exception {
         builder.internalDate = SUN_SEP_9TH_2001;
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.internalDateBefore(getDate(9, 9, 2000), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.internalDateBefore(getDate(8, 9, 2001), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.internalDateBefore(getDate(9, 9, 2001), DateResolution.Day), row, recent, log));
-        assertTrue(MessageSearches.isMatch(
+        assertTrue(new MessageSearches().isMatch(
                 SearchQuery.internalDateBefore(getDate(10, 9, 2001), DateResolution.Day), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.internalDateBefore(getDate(9, 9, 2002), DateResolution.Day),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.internalDateBefore(getDate(9, 9, 2002), DateResolution.Day),
                 row, recent, log));
     }
 
@@ -157,15 +157,15 @@ public class SearchUtilsTest {
     public void testMatchInternalDateAfter() throws Exception {
         builder.internalDate = SUN_SEP_9TH_2001;
         Message<Long> row = builder.build();
-        assertTrue(MessageSearches.isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2000), DateResolution.Day),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2000), DateResolution.Day),
                 row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.internalDateAfter(getDate(8, 9, 2001), DateResolution.Day),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.internalDateAfter(getDate(8, 9, 2001), DateResolution.Day),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2001), DateResolution.Day),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2001), DateResolution.Day),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.internalDateAfter(getDate(10, 9, 2001), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2002), DateResolution.Day),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.internalDateAfter(getDate(9, 9, 2002), DateResolution.Day),
                 row, recent, log));
     }
 
@@ -173,17 +173,17 @@ public class SearchUtilsTest {
     public void testMatchHeaderDateAfter() throws Exception {
         builder.header(DATE_FIELD, RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
                 9, 2000), DateResolution.Day), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
                 9, 2001), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
                 9, 2001), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
                 getDate(10, 9, 2001), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
                 9, 2002), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
                 2001), DateResolution.Day), row, recent, log));
     }
 
@@ -191,17 +191,17 @@ public class SearchUtilsTest {
     public void testShouldMatchCapsHeaderDateAfter() throws Exception {
         builder.header(DATE_FIELD.toUpperCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
                 9, 2000), DateResolution.Day), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
                 9, 2001), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
                 9, 2001), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
                 getDate(10, 9, 2001), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
                 9, 2002), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
                 2001), DateResolution.Day), row, recent, log));
     }
 
@@ -209,17 +209,17 @@ public class SearchUtilsTest {
     public void testShouldMatchLowersHeaderDateAfter() throws Exception {
         builder.header(DATE_FIELD.toLowerCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
                 9, 2000), DateResolution.Day), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(8,
                 9, 2001),DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
                 9, 2001), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD,
                 getDate(10, 9, 2001), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(9,
                 9, 2002), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter("BOGUS", getDate(9, 9,
                 2001), DateResolution.Day),row, recent, log));
     }
 
@@ -227,17 +227,17 @@ public class SearchUtilsTest {
     public void testMatchHeaderDateOn() throws Exception {
         builder.header(DATE_FIELD, RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+        assertFalse(new 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,
+        assertFalse(new 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,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
                 2001), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(10,
+        assertFalse(new 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,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
                 2002), DateResolution.Day), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
                 2001), DateResolution.Day), row, recent, log));
     }
 
@@ -245,17 +245,17 @@ public class SearchUtilsTest {
     public void testShouldMatchCapsHeaderDateOn() throws Exception {
         builder.header(DATE_FIELD.toUpperCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+        assertFalse(new 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,
+        assertFalse(new 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,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
                 2001), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(10,
+        assertFalse(new 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,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
                 2002), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
                 2001), DateResolution.Day),row, recent, log));
     }
 
@@ -263,17 +263,17 @@ public class SearchUtilsTest {
     public void testShouldMatchLowersHeaderDateOn() throws Exception {
         builder.header(DATE_FIELD.toLowerCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
+        assertFalse(new 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,
+        assertFalse(new 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,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
                 2001), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(10,
+        assertFalse(new 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,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(9, 9,
                 2002), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateOn("BOGUS", getDate(9, 9,
                 2001), DateResolution.Day),row, recent, log));
     }
 
@@ -281,17 +281,17 @@ public class SearchUtilsTest {
     public void testMatchHeaderDateBefore() throws Exception {
         builder.header(DATE_FIELD.toLowerCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(9, 9, 2000), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(8, 9, 2001), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(9, 9, 2001), DateResolution.Day),row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(10, 9, 2001), DateResolution.Day),row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
                 9, 2002), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
                 9, 2001), DateResolution.Day),row, recent, log));
     }
 
@@ -299,17 +299,17 @@ public class SearchUtilsTest {
     public void testShouldMatchCapsHeaderDateBefore() throws Exception {
         builder.header(DATE_FIELD.toLowerCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(9, 9, 2000), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(8, 9, 2001), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(9, 9, 2001), DateResolution.Day),row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(10, 9, 2001), DateResolution.Day),row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
                 9, 2002), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
                 9, 2001), DateResolution.Day),row, recent, log));
     }
 
@@ -317,17 +317,17 @@ public class SearchUtilsTest {
     public void testShouldMatchLowersHeaderDateBefore() throws Exception {
         builder.header(DATE_FIELD.toLowerCase(), RFC822_SUN_SEP_9TH_2001);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(9, 9, 2000), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(8, 9, 2001), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(9, 9, 2001), DateResolution.Day),row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD,
                 getDate(10, 9, 2001), DateResolution.Day),row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(9,
                 9, 2002), DateResolution.Day),row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore("BOGUS", getDate(9,
                 9, 2001), DateResolution.Day),row, recent, log));
     }
 
@@ -335,15 +335,15 @@ public class SearchUtilsTest {
     public void testMatchHeaderContainsCaps() throws Exception {
         builder.header(SUBJECT_FIELD, TEXT.toUpperCase());
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(DATE_FIELD,
                 CUSTARD), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(DATE_FIELD,
                 TEXT), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 TEXT), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 RHUBARD), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 CUSTARD), row, recent, log));
     }
 
@@ -351,15 +351,15 @@ public class SearchUtilsTest {
     public void testMatchHeaderContainsLowers() throws Exception {
         builder.header(SUBJECT_FIELD, TEXT.toUpperCase());
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(DATE_FIELD,
                 CUSTARD), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(DATE_FIELD,
                 TEXT), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 TEXT), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 RHUBARD), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 CUSTARD), row, recent, log));
     }
 
@@ -367,15 +367,15 @@ public class SearchUtilsTest {
     public void testMatchHeaderContains() throws Exception {
         builder.header(SUBJECT_FIELD, TEXT.toUpperCase());
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(DATE_FIELD,
                 CUSTARD), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(DATE_FIELD,
                 TEXT), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 TEXT), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 RHUBARD), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 CUSTARD), row, recent, log));
     }
 
@@ -383,15 +383,15 @@ public class SearchUtilsTest {
     public void testShouldMatchLowerHeaderContains() throws Exception {
         builder.header(SUBJECT_FIELD.toLowerCase(), TEXT);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(DATE_FIELD,
                 CUSTARD), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(DATE_FIELD,
                 TEXT), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 TEXT), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 RHUBARD), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 CUSTARD), row, recent, log));
     }
 
@@ -399,15 +399,15 @@ public class SearchUtilsTest {
     public void testShouldMatchCapsHeaderContains() throws Exception {
         builder.header(SUBJECT_FIELD.toUpperCase(), TEXT);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(DATE_FIELD,
                 CUSTARD), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(DATE_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(DATE_FIELD,
                 TEXT), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 TEXT), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 RHUBARD), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerContains(SUBJECT_FIELD,
                 CUSTARD), row, recent, log));
     }
 
@@ -415,9 +415,9 @@ public class SearchUtilsTest {
     public void testMatchHeaderExists() throws Exception {
         builder.header(SUBJECT_FIELD, TEXT);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerExists(DATE_FIELD), row,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerExists(DATE_FIELD), row,
                 recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
                 row, recent, log));
     }
 
@@ -425,9 +425,9 @@ public class SearchUtilsTest {
     public void testShouldMatchLowersHeaderExists() throws Exception {
         builder.header(SUBJECT_FIELD.toLowerCase(), TEXT);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerExists(DATE_FIELD), row,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerExists(DATE_FIELD), row,
                 recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
                 row, recent, log));
     }
 
@@ -435,9 +435,9 @@ public class SearchUtilsTest {
     public void testShouldMatchUppersHeaderExists() throws Exception {
         builder.header(SUBJECT_FIELD.toLowerCase(), TEXT);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerExists(DATE_FIELD), row,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerExists(DATE_FIELD), row,
                 recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerExists(SUBJECT_FIELD),
                 row, recent, log));
     }
 
@@ -445,30 +445,30 @@ public class SearchUtilsTest {
     public void testShouldMatchUidRange() throws Exception {
         builder.setKey(1, 1729);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1, 1)), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1728, 1728)), row,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.uid(range(1, 1)), row, recent, log));
+        assertFalse(new MessageSearches().isMatch(SearchQuery.uid(range(1728, 1728)), row,
                 recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.uid(range(1729, 1729)), row,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.uid(range(1729, 1729)), row,
                 recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1730, 1730)), row,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.uid(range(1730, 1730)), row,
                 recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1, 1728)), row,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.uid(range(1, 1728)), row,
                 recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.uid(range(1, 1729)), row,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.uid(range(1, 1729)), row,
                 recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.uid(range(1729, 1800)), row,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.uid(range(1729, 1800)), row,
                 recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .uid(range(1730, Long.MAX_VALUE)), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1730,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.uid(range(1730,
                 Long.MAX_VALUE, 1, 1728)), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.uid(range(1730, Long.MAX_VALUE,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.uid(range(1730, Long.MAX_VALUE,
                 1, 1729)), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .uid(range(1, 1728, 1800, 1810)), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.uid(range(1, 1, 1729, 1729)),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.uid(range(1, 1, 1729, 1729)),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.uid(range(1, 1, 1800, 1800)),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.uid(range(1, 1, 1800, 1800)),
                 row, recent, log));
     }
 
@@ -476,17 +476,17 @@ public class SearchUtilsTest {
     public void testShouldMatchSeenFlagSet() throws Exception {
         builder.setFlags(true, false, false, false, false, false);
         Message<Long> row = builder.build();
-        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
                 row, recent, log));
     }
 
@@ -494,17 +494,17 @@ public class SearchUtilsTest {
     public void testShouldMatchAnsweredFlagSet() throws Exception {
         builder.setFlags(false, false, true, false, false, false);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
                 row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.ANSWERED),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.ANSWERED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
                 row, recent, log));
     }
 
@@ -512,17 +512,17 @@ public class SearchUtilsTest {
     public void testShouldMatchFlaggedFlagSet() throws Exception {
         builder.setFlags(false, true, false, false, false, false);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
                 row, recent, log));
     }
 
@@ -530,17 +530,17 @@ public class SearchUtilsTest {
     public void testShouldMatchDraftFlagSet() throws Exception {
         builder.setFlags(false, false, false, true, false, false);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
                 row, recent, log));
     }
 
@@ -549,17 +549,17 @@ public class SearchUtilsTest {
     public void testShouldMatchDeletedFlagSet() throws Exception {
         builder.setFlags(false, false, false, false, true, false);
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
                 row, recent, log));
     }
 
@@ -568,17 +568,17 @@ public class SearchUtilsTest {
         builder.setFlags(false, false, false, false, false, false);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.FLAGGED),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.flagIsSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.DELETED),
                 row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.flagIsSet(Flags.Flag.RECENT),
                 row, recent, log));
     }
 
@@ -587,17 +587,17 @@ public class SearchUtilsTest {
         builder.setFlags(false, true, true, true, true, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent, log));
     }
 
@@ -606,17 +606,17 @@ public class SearchUtilsTest {
         builder.setFlags(true, true, false, true, true, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery
+        assertTrue(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent, log));
     }
 
@@ -625,17 +625,17 @@ public class SearchUtilsTest {
         builder.setFlags(true, false, true, true, true, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertTrue(MessageSearches.isMatch(
+        assertTrue(new MessageSearches().isMatch(
                 SearchQuery.flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent, log));
     }
 
@@ -644,17 +644,17 @@ public class SearchUtilsTest {
         builder.setFlags(true, true, true, false, true, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent, log));
     }
 
@@ -663,17 +663,17 @@ public class SearchUtilsTest {
         builder.setFlags(true, true, true, true, false, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid()));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertTrue(MessageSearches.isMatch(
+        assertTrue(new MessageSearches().isMatch(
                 SearchQuery.flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(
+        assertFalse(new MessageSearches().isMatch(
                 SearchQuery.flagIsUnSet(Flags.Flag.RECENT), row, recent, log));
     }
 
@@ -682,60 +682,60 @@ public class SearchUtilsTest {
         builder.setFlags(true, true, true, true, true, true);
         Message<Long> row = builder.build();
         recent.add(new Long(row.getUid() + 1));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.SEEN),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.FLAGGED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.ANSWERED), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.DRAFT),
                 row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .flagIsUnSet(Flags.Flag.DELETED), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.flagIsUnSet(Flags.Flag.RECENT),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.flagIsUnSet(Flags.Flag.RECENT),
                 row, recent, log));
     }
 
     @Test
     public void testShouldMatchAll() throws Exception {
         Message<Long> row = builder.build();
-        assertTrue(MessageSearches.isMatch(SearchQuery.all(), row, recent, log));
+        assertTrue(new MessageSearches().isMatch(SearchQuery.all(), row, recent, log));
     }
 
     @Test
     public void testShouldMatchNot() throws Exception {
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.not(SearchQuery.all()), row,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.not(SearchQuery.all()), row,
                 recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.not(SearchQuery
+        assertTrue(new MessageSearches().isMatch(SearchQuery.not(SearchQuery
                 .headerExists(DATE_FIELD)), row, recent, log));
     }
 
     @Test
     public void testShouldMatchOr() throws Exception {
         Message<Long> row = builder.build();
-        assertTrue(MessageSearches.isMatch(SearchQuery.or(SearchQuery.all(),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.or(SearchQuery.all(),
                 SearchQuery.headerExists(DATE_FIELD)), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.or(SearchQuery
+        assertTrue(new MessageSearches().isMatch(SearchQuery.or(SearchQuery
                 .headerExists(DATE_FIELD), SearchQuery.all()), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .or(SearchQuery.headerExists(DATE_FIELD), SearchQuery
                         .headerExists(DATE_FIELD)), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.or(SearchQuery.all(),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.or(SearchQuery.all(),
                 SearchQuery.all()), row, recent, log));
     }
 
     @Test
     public void testShouldMatchAnd() throws Exception {
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.and(SearchQuery.all(),
+        assertFalse(new MessageSearches().isMatch(SearchQuery.and(SearchQuery.all(),
                 SearchQuery.headerExists(DATE_FIELD)), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery.and(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery.and(SearchQuery
                 .headerExists(DATE_FIELD), SearchQuery.all()), row, recent, log));
-        assertFalse(MessageSearches.isMatch(SearchQuery
+        assertFalse(new MessageSearches().isMatch(SearchQuery
                 .and(SearchQuery.headerExists(DATE_FIELD), SearchQuery
                         .headerExists(DATE_FIELD)), row, recent, log));
-        assertTrue(MessageSearches.isMatch(SearchQuery.and(SearchQuery.all(),
+        assertTrue(new MessageSearches().isMatch(SearchQuery.and(SearchQuery.all(),
                 SearchQuery.all()), row, recent, log));
     }
     
@@ -758,12 +758,12 @@ 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(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(26, 3,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(26, 3,
                 2007), DateResolution.Day),row, recent, log));
         
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(25, 3,
+        assertFalse(new 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,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateOn(DATE_FIELD, getDate(27, 3,
                 2007), DateResolution.Day),row, recent, log));
     }
     
@@ -772,12 +772,12 @@ 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(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(26, 3,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(26, 3,
                 2007), DateResolution.Day),row, recent, log));
         
-        assertTrue(MessageSearches.isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(27, 3,
+        assertTrue(new 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,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateBefore(DATE_FIELD, getDate(25, 3,
                 2007), DateResolution.Day),row, recent, log));
     }
 
@@ -785,12 +785,12 @@ public class SearchUtilsTest {
     public void testShouldMatchHeaderDateAfterWithOffset() throws Exception {
         builder.header(DATE_FIELD, "Mon, 26 Mar 2007 00:00:00 +0300");
         Message<Long> row = builder.build();
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(26, 3,
+        assertFalse(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(26, 3,
                 2007), DateResolution.Day),row, recent, log));
         
-        assertFalse(MessageSearches.isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(27, 3,
+        assertFalse(new 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,
+        assertTrue(new MessageSearches().isMatch(SearchQuery.headerDateAfter(DATE_FIELD, getDate(25, 3,
                 2007), DateResolution.Day),row, recent, log));
     }
     
@@ -798,8 +798,8 @@ public class SearchUtilsTest {
     public void testShouldMatchAddressHeaderWithComments() throws Exception {
         builder.header("To", "<user-from (comment)@ (comment) domain.org>");
         Message<Long> row = builder.build();
-        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));
+        assertTrue(new MessageSearches().isMatch(SearchQuery.address(AddressType.To, "user-from@domain.org"), row, recent, log));
+        assertFalse(new 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