public CreditResponse getCredit(String identificationNumber, int creditId) {
        CreditDocument creditDocument = elasticCreditRepository.findByIdAndIdentificationNumber(creditId, identificationNumber).orElseThrow(() -> createCreditNotFoundException(creditId));
        return getCreditResponseFromCreditDocument(creditDocument);
    }
@Test
    void getCredit() {
        // Arrange
        String identificationNumber = "1234567890";
        int creditId = 1;
        CreditDocument creditDocument = CreditDocument.builder()
                .id(creditId)
                .amount(BigDecimal.valueOf(1000))
                .status(CreditStatus.STARTED)
                .identificationNumber(identificationNumber)
                .build();
        when(elasticCreditRepository.findByIdAndIdentificationNumber(creditId, identificationNumber)).thenReturn(Optional.of(creditDocument));

        // Act
        CreditResponse creditResponse = creditService.getCredit(identificationNumber, creditId);

        // Assert
        assertEquals(creditDocument.getId(), creditResponse.getId());
        assertEquals(creditDocument.getAmount(), creditResponse.getAmount());
        assertEquals(creditDocument.getStatus(), creditResponse.getStatus());
    }