    @Test
    public void testResultSetIterator_multipleHasNextWorks() {

        createAndFillUserTable();

        ResultSetIterable<User> allUsers = sql2o.createQuery("select * from User").executeAndFetchLazy(User.class);

        Iterator<User> usersIterator = allUsers.iterator();

        // call hasNext a few times, should have no effect
        usersIterator.hasNext();
        usersIterator.hasNext();
        usersIterator.hasNext();

        int totalSize = 0;
        while (usersIterator.hasNext()) {
            totalSize++;
            usersIterator.next();
        }

        allUsers.close();

        assertTrue(totalSize == insertIntoUsers);
        deleteUserTable();
    }