@Override
    public List<ApiMessageAndVersion> next() {
        if (!hasNext()) throw new NoSuchElementException();
        List<ApiMessageAndVersion> result = new ArrayList<>(10);
        for (int i = 0; i < maxRecordsInBatch; i++) {
            if (!iterator.hasNext()) break;
            StandardAclWithId aclWithId = iterator.next();
            result.add(new ApiMessageAndVersion(aclWithId.toRecord(), (short) 0));
        }
        return result;
    }
@Test
    public void testNoSuchElementException() {
        StandardAclRecordIterator iterator =
            new StandardAclRecordIterator(TEST_ACLS.iterator(), 2);
        iterator.next();
        iterator.next();
        iterator.next();
        assertThrows(NoSuchElementException.class, iterator::next);
    }