@Override
    public boolean hasNext() {
        if (currentIndex < currentData.size()) {
            return true;
        }
        if (currentPageable == null) {
            return false;
        }
        currentData = loadData();
        currentIndex = 0;
        return !currentData.isEmpty();
    }
@Test
    @SuppressWarnings("unchecked")
    void testConstructor_loadsData() {
        Page<Extension> page = mock(Page.class);
        when(page.getContent()).thenReturn(List.of(mock(Extension.class)));
        when(page.hasNext()).thenReturn(true);
        when(page.nextPageable()).thenReturn(
            PageRequest.of(1, DefaultExtensionIterator.DEFAULT_PAGE_SIZE, Sort.by("name")));
        when(lister.list(any())).thenReturn(page);

        var iterator = new DefaultExtensionIterator<>(lister);

        assertThat(iterator.hasNext()).isTrue();
    }