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

        Iterator<Hit> it = root.deepIterator();
        assertTrue(it.hasNext());
        assertEquals("foo", it.next().getId().toString());
        assertTrue(it.hasNext());
        assertEquals("bar", it.next().getId().toString());
        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