@Test
    void testOrder() {
        HitGroup root = new HitGroup();
        MyHitGroup group = new MyHitGroup();
        group.add(new Hit("foo"));
        root.add(group);

        Iterator<Hit> it = root.deepIterator();
        assertTrue(it.hasNext());
        assertEquals("foo", it.next().getId().toString());
        assertEquals(Boolean.TRUE, group.ordered);
        assertFalse(it.hasNext());

        it = root.unorderedDeepIterator();
        assertTrue(it.hasNext());
        assertEquals("foo", it.next().getId().toString());
        assertEquals(Boolean.FALSE, group.ordered);
        assertFalse(it.hasNext());
    }
Ensure that the {@link DeepHitIterator} works as intended.

@author havardpe
container-search/src/test/java/com/yahoo/search/result/test/DeepHitIteratorTestCase.java