@Override
    public int compareTo(LeanHit o) {
        int res = (sortData != null)
                ? compareData(sortData, o.sortData)
                : Double.compare(o.relevance, relevance);
        return (res != 0) ? res : compareData(gid, o.gid);
    }
@Test
    void testOrderingByGid() {
        assertEquals(0, new LeanHit(gidA, 0, 0, 1).compareTo(new LeanHit(gidA, 0, 0, 1)));

        verifyTransitiveOrdering(new LeanHit(gidA, 0, 0, 1),
                new LeanHit(gidB, 0, 0, 1),
                new LeanHit(gidC, 0, 0, 1));
    }