@Test
    void testHitOrdering() {
        Result result = new Result(new Query("dummy"));
        result.hits().add(new Hit("test:hit1", 80));
        result.hits().add(new Hit("test:hit2", 90));
        result.hits().add(new Hit("test:hit3", 70));

        Iterator<?> hits = result.hits().deepIterator();
        assertEquals(new Hit("test:hit2", 90), hits.next());
        assertEquals(new Hit("test:hit1", 80), hits.next());
        assertEquals(new Hit("test:hit3", 70), hits.next());
    }
Tests the result class

@author bratseth
container-search/src/test/java/com/yahoo/prelude/test/ResultTestCase.java