assertTrue(ascOrdering.isOrdered(results.getDigests()));
}
public void testSearchOrderByCreatedDescWorks() throws Exception {
for (int i = 0; i < 10; i++) {
WaveletName name = WaveletName.of(WaveId.of(DOMAIN, String.valueOf(i)), WAVELET_ID);
submitDeltaToNewWavelet(name, USER1, addParticipantToWavelet(USER1, name));
}
SearchResult results = searchProvider.search(USER1, "in:inbox orderby:createddesc", 0, 10);
Ordering<SearchResult.Digest> descOrdering = Ordering.from(DESC_CREATED_COMPARATOR);
assertTrue(descOrdering.isOrdered(results.getDigests()));