assertEquals(2L, it4.next().longValue());
assertFalse(it4.hasNext());
}
@Test
public void testSortBaseSubject() throws Exception {
SearchQuery q2 = new SearchQuery();
q2.andCriteria(SearchQuery.all());
q2.setSorts(Arrays.asList(new SearchQuery.Sort(SortClause.BaseSubject, false)));
Iterator<Long> it4 = index.search(null, mailbox, q2);
assertEquals(2L, it4.next().longValue());
assertEquals(1L, it4.next().longValue());
assertEquals(3L, it4.next().longValue());