public Page<SamlMetadataProcessError> getSamlMetadataById(Long resultId, int pageIndex, int pageSize) {
        return errorRepository.findBySamlMetadataProcessResultId(resultId, PageRequest.of(pageIndex, pageSize));
    }
@Test
    void getSamlMetadataById() {
        when(errorRepositoryMock.findBySamlMetadataProcessResultId(1L, PageRequest.of(1, 10))).thenReturn(MetadataProcessHelper.getPageSamlMetadataProcessError());

        Page<SamlMetadataProcessError> result = metadataRetrieverServiceMock.getSamlMetadataById(1L, 1, 10);

        verify(errorRepositoryMock, times(1)).findBySamlMetadataProcessResultId(1L, PageRequest.of(1, 10));
        assertNotNull(result);
    }