public void processScheduledTask(String name) throws SharedServiceClientException {
        if(RE_CHECK_DOCUMENTS.equals(name)) {
            var daysAgo = sharedServiceClient.getSSConfigInt("interval_lost_stolen_check");
            for (IdCheckDocument document : idCheckDocumentRepository.findAllWithCreationDateTimeBefore(ZonedDateTime.now().minusDays(daysAgo))) {
                var response = dwsClient.checkBvBsn(document.getDocumentType(), document.getDocumentNumber());

                if (response.get(STATUS).equals(NOK)) {
                    digidClient.remoteLog("1577", Map.of(
                        "document_type", document.getDocumentType(),
                        "document_number", document.getDocumentNumber(),
                        "user_app", document.getUserAppId(),
                        "account_id", document.getAccountId(),
                        "created_at", document.getCreatedAt().format(DateTimeFormatter.ISO_LOCAL_DATE),
                        HIDDEN, true
                    ));
                }

                idCheckDocumentRepository.delete(document);
            }
        }
    }
@Test
    void processesScheduledTaskValidDocument() throws SharedServiceClientException {
        when(dwsClient.checkBvBsn("document_type", "document_number")).thenReturn(Map.of("status", "OK"));
        when(sharedServiceClient.getSSConfigInt("interval_lost_stolen_check")).thenReturn(7);

        service.processScheduledTask("re_check_documents");

        verify(digidClient, times(0)).remoteLog("1577", Map.of("document_type", "document_type", "document_number", "document_number","user_app", "user_app_id", "account_id", 1L, "created_at", "2022-10-07", "hidden", true));
    }