@Override
    public Iterator iterator() {
        if (entries == null) {
            return Collections.emptyIterator();
        }
        return new ResultIterator();
    }
@Test
    public void testIterator_whenEmpty() {
        List<Map.Entry> emptyList = Collections.emptyList();
        ResultSet resultSet = new ResultSet(emptyList, IterationType.KEY);
        Iterator iterator = resultSet.iterator();
        assertFalse(iterator.hasNext());
    }