From 2e1e5e65c34b5f0dc34c4302c79619a331cc572c Mon Sep 17 00:00:00 2001 From: Andrea De Rinaldis <117269497+andrea-deri@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:02:15 +0200 Subject: [PATCH] feat: various fixes after a more detailed testing sessions (#15) * fix: (system test) change on wrong generation for APIM key * fix: (Helm charts) add more time for readiness probe * fix: (Helm charts) add more time for liveness probe * fix: (system test) updated tests * fix: refactored NAV generation, including aux-digit at the start of NAV * chore: moved system tests in integration-test folder * chore: updated README.md file for system tests --------- Co-authored-by: pagopa-github-bot --- README.md | 12 ++++-- helm/Chart.yaml | 4 +- helm/values-dev.yaml | 6 +-- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- integration-test/{ => cucumber}/README.md | 0 .../{ => cucumber}/run_integration_test.sh | 0 integration-test/{ => cucumber}/src/README.md | 0 .../{ => cucumber}/src/config/.env.dev | 0 .../{ => cucumber}/src/config/.env.local | 0 .../{ => cucumber}/src/config/.env.prod | 0 .../{ => cucumber}/src/config/.env.uat | 0 .../src/features/example.feature | 0 .../{ => cucumber}/src/package.json | 0 .../src/step_definitions/support/common.js | 0 .../src/step_definitions/support/steps.js | 0 .../system-test/README.md | 0 .../system-test/run.sh | 0 integration-test/system-test/src/.nvmrc | 1 + .../system-test/src/config/.env.dev | 2 +- .../system-test/src/lib/client.js | 8 ++-- .../system-test/src/lib/util.js | 0 .../system-test/src/package-lock.json | 0 .../system-test/src/package.json | 0 .../src/requests/rpt/ko_withstamp.js | 0 .../src/requests/rpt/ok_nostamp.js | 0 .../system-test/src/start.js | 41 +++++++++++-------- openapi/openapi.json | 2 +- pom.xml | 2 +- .../wispconverter/service/CacheService.java | 6 +-- .../service/DebtPositionService.java | 5 +-- 31 files changed, 50 insertions(+), 43 deletions(-) rename integration-test/{ => cucumber}/README.md (100%) rename integration-test/{ => cucumber}/run_integration_test.sh (100%) rename integration-test/{ => cucumber}/src/README.md (100%) rename integration-test/{ => cucumber}/src/config/.env.dev (100%) rename integration-test/{ => cucumber}/src/config/.env.local (100%) rename integration-test/{ => cucumber}/src/config/.env.prod (100%) rename integration-test/{ => cucumber}/src/config/.env.uat (100%) rename integration-test/{ => cucumber}/src/features/example.feature (100%) rename integration-test/{ => cucumber}/src/package.json (100%) rename integration-test/{ => cucumber}/src/step_definitions/support/common.js (100%) rename integration-test/{ => cucumber}/src/step_definitions/support/steps.js (100%) rename {scripts => integration-test}/system-test/README.md (100%) rename {scripts => integration-test}/system-test/run.sh (100%) create mode 100644 integration-test/system-test/src/.nvmrc rename {scripts => integration-test}/system-test/src/config/.env.dev (55%) rename {scripts => integration-test}/system-test/src/lib/client.js (81%) rename {scripts => integration-test}/system-test/src/lib/util.js (100%) rename {scripts => integration-test}/system-test/src/package-lock.json (100%) rename {scripts => integration-test}/system-test/src/package.json (100%) rename {scripts => integration-test}/system-test/src/requests/rpt/ko_withstamp.js (100%) rename {scripts => integration-test}/system-test/src/requests/rpt/ok_nostamp.js (100%) rename {scripts => integration-test}/system-test/src/start.js (60%) diff --git a/README.md b/README.md index 667f112e..cd1d0b99 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # pagoPA WISP Converter -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=TODO-set-your-id&metric=alert_status)](https://sonarcloud.io/dashboard?id=TODO-set-your-id) -[![Integration Tests](https://github.com/pagopa//actions/workflows/integration_test.yml/badge.svg?branch=main)](https://github.com/pagopa//actions/workflows/integration_test.yml) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=pagopa_pagopa-wisp-converter&metric=alert_status)](https://sonarcloud.io/dashboard?id=pagopa_pagopa-wisp-converter) +[![Integration Tests](https://github.com/pagopa/pagopa-wisp-converter/actions/workflows/integration_test.yml/badge.svg?branch=main)](https://github.com/pagopa/pagopa-wisp-converter/actions/workflows/integration_test.yml) A service that permits to handle nodoInviaRPT and nodoInviaCarrelloRPT request from WISP, interfacing them with GPD system @@ -59,7 +59,13 @@ To run the **Junit** tests: #### Integration testing -From `./integration-test/src` +For automatic execution of simple tests for checking the correct workflow between the various components, execute the +following commands from `./integration-test/system-test`: + +`sh run.sh dev TESTCASE SUBKEY` + +A more wide information about this test can be found in Readme file in the same folder. +For classical integration tests with Cucumber, execute the following commands from `./integration-test/cucumber/src`: 1. `yarn install` 2. `yarn test` diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 5473f40b..a3bb37ba 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-wisp-converter description: A service that permits to handle nodoInviaRPT and nodoInviaCarrelloRPT request from WISP, interfacing them with GPD system type: application -version: 0.16.0 -appVersion: 0.0.10 +version: 0.19.0 +appVersion: 0.0.10-3-test-update dependencies: - name: microservice-chart version: 3.0.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 157e95ed..d8c5d7ae 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,20 +4,20 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-wisp-converter - tag: "0.0.10" + tag: "0.0.10-3-test-update" pullPolicy: Always livenessProbe: httpGet: path: /actuator/health/liveness port: 8080 - initialDelaySeconds: 90 + initialDelaySeconds: 180 failureThreshold: 6 periodSeconds: 10 readinessProbe: httpGet: path: /actuator/health/readiness port: 8080 - initialDelaySeconds: 90 + initialDelaySeconds: 180 failureThreshold: 6 periodSeconds: 10 deployment: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 908f7492..421c7987 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-wisp-converter - tag: "0.0.10" + tag: "0.0.10-3-test-update" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index d2b0247f..c1478dee 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-wisp-converter - tag: "0.0.10" + tag: "0.0.10-3-test-update" pullPolicy: Always livenessProbe: httpGet: diff --git a/integration-test/README.md b/integration-test/cucumber/README.md similarity index 100% rename from integration-test/README.md rename to integration-test/cucumber/README.md diff --git a/integration-test/run_integration_test.sh b/integration-test/cucumber/run_integration_test.sh similarity index 100% rename from integration-test/run_integration_test.sh rename to integration-test/cucumber/run_integration_test.sh diff --git a/integration-test/src/README.md b/integration-test/cucumber/src/README.md similarity index 100% rename from integration-test/src/README.md rename to integration-test/cucumber/src/README.md diff --git a/integration-test/src/config/.env.dev b/integration-test/cucumber/src/config/.env.dev similarity index 100% rename from integration-test/src/config/.env.dev rename to integration-test/cucumber/src/config/.env.dev diff --git a/integration-test/src/config/.env.local b/integration-test/cucumber/src/config/.env.local similarity index 100% rename from integration-test/src/config/.env.local rename to integration-test/cucumber/src/config/.env.local diff --git a/integration-test/src/config/.env.prod b/integration-test/cucumber/src/config/.env.prod similarity index 100% rename from integration-test/src/config/.env.prod rename to integration-test/cucumber/src/config/.env.prod diff --git a/integration-test/src/config/.env.uat b/integration-test/cucumber/src/config/.env.uat similarity index 100% rename from integration-test/src/config/.env.uat rename to integration-test/cucumber/src/config/.env.uat diff --git a/integration-test/src/features/example.feature b/integration-test/cucumber/src/features/example.feature similarity index 100% rename from integration-test/src/features/example.feature rename to integration-test/cucumber/src/features/example.feature diff --git a/integration-test/src/package.json b/integration-test/cucumber/src/package.json similarity index 100% rename from integration-test/src/package.json rename to integration-test/cucumber/src/package.json diff --git a/integration-test/src/step_definitions/support/common.js b/integration-test/cucumber/src/step_definitions/support/common.js similarity index 100% rename from integration-test/src/step_definitions/support/common.js rename to integration-test/cucumber/src/step_definitions/support/common.js diff --git a/integration-test/src/step_definitions/support/steps.js b/integration-test/cucumber/src/step_definitions/support/steps.js similarity index 100% rename from integration-test/src/step_definitions/support/steps.js rename to integration-test/cucumber/src/step_definitions/support/steps.js diff --git a/scripts/system-test/README.md b/integration-test/system-test/README.md similarity index 100% rename from scripts/system-test/README.md rename to integration-test/system-test/README.md diff --git a/scripts/system-test/run.sh b/integration-test/system-test/run.sh similarity index 100% rename from scripts/system-test/run.sh rename to integration-test/system-test/run.sh diff --git a/integration-test/system-test/src/.nvmrc b/integration-test/system-test/src/.nvmrc new file mode 100644 index 00000000..a90dfe9a --- /dev/null +++ b/integration-test/system-test/src/.nvmrc @@ -0,0 +1 @@ +v20.5.1 \ No newline at end of file diff --git a/scripts/system-test/src/config/.env.dev b/integration-test/system-test/src/config/.env.dev similarity index 55% rename from scripts/system-test/src/config/.env.dev rename to integration-test/system-test/src/config/.env.dev index 9cfe74b4..b23ef123 100644 --- a/scripts/system-test/src/config/.env.dev +++ b/integration-test/system-test/src/config/.env.dev @@ -1,4 +1,4 @@ -wisp_converter_soap_host=https://api.dev.platform.pagopa.it/wisp-soap-converter/soap/v1 +wisp_converter_soap_host=https://api.dev.platform.pagopa.it/nodo-auth/nodo-per-pa/v1 // temporary wisp_converter_host=https://dev.wisp2.pagopa.it/wisp-converter/redirect/api/v1/payments?sessionId \ No newline at end of file diff --git a/scripts/system-test/src/lib/client.js b/integration-test/system-test/src/lib/client.js similarity index 81% rename from scripts/system-test/src/lib/client.js rename to integration-test/system-test/src/lib/client.js index 6a5184a1..c6c62481 100644 --- a/scripts/system-test/src/lib/client.js +++ b/integration-test/system-test/src/lib/client.js @@ -16,7 +16,7 @@ async function call(method, url, body, headers) { } async function get(url, headers) { - return await axios.get(url, headers) + return await axios.get(url, { headers: headers }) .then(res => { return res; }) @@ -26,7 +26,7 @@ async function get(url, headers) { } async function post(url, body, headers) { - return await axios.post(url, body, headers) + return await axios.post(url, body, { headers: headers }) .then(res => { return res; }) @@ -36,7 +36,7 @@ async function post(url, body, headers) { } async function put(url, body, headers) { - return await axios.put(url, body, headers) + return await axios.put(url, body, { headers: headers }) .then(res => { return res; }) @@ -46,7 +46,7 @@ async function put(url, body, headers) { } async function del(url, headers) { - return await axios.delete(url, headers) + return await axios.delete(url, { headers: headers }) .then(res => { return res; }) diff --git a/scripts/system-test/src/lib/util.js b/integration-test/system-test/src/lib/util.js similarity index 100% rename from scripts/system-test/src/lib/util.js rename to integration-test/system-test/src/lib/util.js diff --git a/scripts/system-test/src/package-lock.json b/integration-test/system-test/src/package-lock.json similarity index 100% rename from scripts/system-test/src/package-lock.json rename to integration-test/system-test/src/package-lock.json diff --git a/scripts/system-test/src/package.json b/integration-test/system-test/src/package.json similarity index 100% rename from scripts/system-test/src/package.json rename to integration-test/system-test/src/package.json diff --git a/scripts/system-test/src/requests/rpt/ko_withstamp.js b/integration-test/system-test/src/requests/rpt/ko_withstamp.js similarity index 100% rename from scripts/system-test/src/requests/rpt/ko_withstamp.js rename to integration-test/system-test/src/requests/rpt/ko_withstamp.js diff --git a/scripts/system-test/src/requests/rpt/ok_nostamp.js b/integration-test/system-test/src/requests/rpt/ok_nostamp.js similarity index 100% rename from scripts/system-test/src/requests/rpt/ok_nostamp.js rename to integration-test/system-test/src/requests/rpt/ok_nostamp.js diff --git a/scripts/system-test/src/start.js b/integration-test/system-test/src/start.js similarity index 60% rename from scripts/system-test/src/start.js rename to integration-test/system-test/src/start.js index 1f89b35d..c2f75025 100644 --- a/scripts/system-test/src/start.js +++ b/integration-test/system-test/src/start.js @@ -6,11 +6,13 @@ const {DOMParser} = require('xmldom'); const {env} = require("dotenv"); -const nodoInviaRPTPrimitive = "NodoInviaRPT"; -const nodoInviaCarrelloRPTPrimitive = "NodoInviaCarrelloRPT"; +const nodoInviaRPTPrimitive = "nodoInviaRPT"; +const nodoInviaCarrelloRPTPrimitive = "nodoInviaCarrelloRPT"; const file = process.argv[2]; const subkey = process.argv[3]; + +console.log("Executing test case [", file, "]"); main(); @@ -19,36 +21,37 @@ async function main() { let request = getRequest(); let responseFromSOAPConverter = await callWispSoapConverter(request); + if (responseFromSOAPConverter.status !== 200) { + console.log('Error [', responseFromSOAPConverter.data, ']\n=====================\n'); + return; + } + const parser = new DOMParser(); const xmlDoc = parser.parseFromString(responseFromSOAPConverter.data, "text/xml"); const outcome = xmlDoc.getElementsByTagName("esito")[0].textContent; - console.log('==Response:==\nStatus: [', responseFromSOAPConverter.status, ']\n=====================\n'); let url = ""; - let isOK = false; if (outcome === "OK") { - isOK = true; url = xmlDoc.getElementsByTagName("url")[0].textContent; } else { const faultCode = xmlDoc.getElementsByTagName("faultCode")[0].textContent; const description = xmlDoc.getElementsByTagName("description")[0].textContent; console.log('Error [', faultCode, ']: ', description, "\n=====================\n"); + return; } - if (isOK) { - // temporary replacement - url = url.replace(/http:\/\/adapterecommerce\.pagopa\.it\?idSession/g, process.env.wisp_converter_host); + // temporary replacement + url = url.replace(/http:\/\/adapterecommerce\.pagopa\.it\?idSession/g, process.env.wisp_converter_host); - console.log('Calling WISP Converter at URL [', url, ']\n=====================\n'); - let responseFromConverter = await call("GET", url, {}); + console.log('Calling WISP Converter at URL [', url, ']\n=====================\n'); + let responseFromConverter = await call("GET", url, {}); - console.log('==Response:==\nStatus: [', responseFromConverter.status, ']\n'); - if (responseFromConverter.status !== 200) { - console.log(responseFromConverter.data); - } - console.log('\n=====================\n'); + console.log('==Response:==\nStatus: [', responseFromConverter.status, ']\n'); + if (responseFromConverter.status !== 200) { + console.log(responseFromConverter.data); } + console.log('\n=====================\n'); } function getRequest() { @@ -68,10 +71,12 @@ function getRequest() { } async function callWispSoapConverter(request) { - console.log('==Request:==\nContent: ', request[1], "\n=====================\n"); + let url = process.env.wisp_converter_soap_host; let headers = { "SOAPAction": request[0], - "Ocp-Apim-Subscription-Key": subkey + "Ocp-Apim-Subscription-Key": `${subkey};product=nodo-auth-wisp` } + console.log('==Request:==\nURL: [', url, ']\nContent: ', request[1], "\nHeaders: ", headers, "\n=====================\n"); return await call("POST", process.env.wisp_converter_soap_host, request[1], headers); -} \ No newline at end of file +} + diff --git a/openapi/openapi.json b/openapi/openapi.json index a1a29208..b477ed13 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4,7 +4,7 @@ "description": "A service that permits to handle nodoInviaRPT and nodoInviaCarrelloRPT request from WISP, converting them in NMU payments.\n\n**STANDARD ERRORS:**\nNAME | CODE | DESCRIPTION\n- | - | -\n**WIC-500** | *ERROR* | *...error description...*\n**WIC-1000** | *GENERIC_ERROR* | Error while executing conversion flow. *...error description...*\n**WIC-1001** | *PARSING_GENERIC_ERROR* | Error while parsing payload. *...error description...*\n**WIC-1002** | *PARSING_INVALID_HEADER* | Error while parsing payload. The SOAP header in payload is invalid: *...error description...*\n**WIC-1003** | *PARSING_INVALID_BODY* | Error while parsing payload. The SOAP body in payload is invalid: *...error description...*\n**WIC-1004** | *PARSING_INVALID_XML_NODES* | Error while parsing payload. The list of nodes extracted from document must be greater than zero, but currently it is zero.\n**WIC-1005** | *PARSING_INVALID_ZIPPED_PAYLOAD* | Error while parsing payload. Cannot unzip payload correctly.\n**WIC-1006** | *PARSING_PRIMITIVE_NOT_VALID* | Error while checking primitive. Primitive [*...content...*] not valid.\n**WIC-1100** | *VALIDATION_INVALID_MULTIBENEFICIARY_CART* | Error while generating debt position for GPD service. The cart is defined as multi-beneficiary but there are a number of RPTs lower than 2.\n**WIC-1101** | *VALIDATION_INVALID_IBANS* | Error while generating debt position for GPD service. The IBAN field must be set if digital stamp is not defined for the transfer.\n**WIC-1102** | *VALIDATION_INVALID_DEBTOR* | Error while generating debt position for GPD service. The debtor subject information is different between the various RPT of the cart.\n**WIC-1103** | *VALIDATION_INVALID_CREDITOR_INSTITUTION* | Error while generating debt position for GPD service. The creditor institution information is different between the various RPT of the cart.\n**WIC-1200** | *CONFIGURATION_INVALID_STATION* | Error while generating cart for Checkout service. No valid station found with code [*...content...*].\n**WIC-1201** | *CONFIGURATION_INVALID_STATION_REDIRECT_URL* | Error while generating cart for Checkout service. The station with code [*...content...*] contains wrong redirect URL and it is not possible to generate valid URI.\n**WIC-2000** | *PERSISTENCE_RPT_NOT_FOUND* | Error while retrieving RPT. RPT with sessionId [*...content...*] not found.\n**WIC-2001** | *PERSISTENCE_REQUESTID_CACHING_ERROR* | Error while caching RequestID. *...error description...*\n**WIC-3000** | *CLIENT_APICONFIGCACHE* | Error while communicating with APIConfig cache service. *...error description...*\n**WIC-3001** | *CLIENT_GPD* | Error while communicating with GPD service. *...error description...*\n**WIC-3002** | *CLIENT_IUVGENERATOR* | Error while communicating with IUV Generator service. *...error description...*\n**WIC-3003** | *CLIENT_DECOUPLER_CACHING* | Error while communicating with decoupler caching API. *...error description...*\n**WIC-3004** | *CLIENT_CHECKOUT* | Error while communicating with Checkout service. *...error description...*\n**WIC-3005** | *CLIENT_CHECKOUT_NO_REDIRECT_LOCATION* | Error while communicating with Checkout service. No valid 'Location' header was found,\n**WIC-3006** | *CLIENT_CHECKOUT_INVALID_REDIRECT_LOCATION* | Error while communicating with Checkout service. An empty 'Location' header was found.\n", "termsOfService": "https://www.pagopa.gov.it/", "title": "WISP Converter", - "version": "0.0.10" + "version": "0.0.10-3-test-update" }, "servers": [ { diff --git a/pom.xml b/pom.xml index 200f3a78..fe417815 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa wisp-converter - 0.0.10 + 0.0.10-3-test-update pagoPA WISP Converter A service that permits to handle nodoInviaRPT and nodoInviaCarrelloRPT request from WISP, converting them in NMU payments. diff --git a/src/main/java/it/gov/pagopa/wispconverter/service/CacheService.java b/src/main/java/it/gov/pagopa/wispconverter/service/CacheService.java index 320a5cfb..f5a17b44 100644 --- a/src/main/java/it/gov/pagopa/wispconverter/service/CacheService.java +++ b/src/main/java/it/gov/pagopa/wispconverter/service/CacheService.java @@ -23,9 +23,7 @@ @RequiredArgsConstructor public class CacheService { - private static final String COMPOSITE_TWOVALUES_KEY_TEMPLATE = "%s_%s"; - - private static final String CACHING_KEY_TEMPLATE = "wisp_" + COMPOSITE_TWOVALUES_KEY_TEMPLATE; + private static final String CACHING_KEY_TEMPLATE = "wisp_%s_%s"; private final it.gov.pagopa.gen.wispconverter.client.decouplercaching.invoker.ApiClient decouplerCachingClient; @@ -43,7 +41,7 @@ public void storeRequestMappingInCache(CommonRPTFieldsDTO commonRPTFieldsDTO, St // communicating with APIM policy for caching data for decoupler it.gov.pagopa.gen.wispconverter.client.decouplercaching.model.DecouplerCachingKeysDto decouplerCachingKeys = new it.gov.pagopa.gen.wispconverter.client.decouplercaching.model.DecouplerCachingKeysDto(); - noticeNumbers.forEach(noticeNumber -> decouplerCachingKeys.addKeysItem(String.format(COMPOSITE_TWOVALUES_KEY_TEMPLATE, creditorInstitutionId, noticeNumber))); + noticeNumbers.forEach(noticeNumber -> decouplerCachingKeys.addKeysItem(String.format(CACHING_KEY_TEMPLATE, creditorInstitutionId, noticeNumber))); it.gov.pagopa.gen.wispconverter.client.decouplercaching.api.DefaultApi apiInstance = new it.gov.pagopa.gen.wispconverter.client.decouplercaching.api.DefaultApi(decouplerCachingClient); apiInstance.saveMapping(decouplerCachingKeys, MDC.get(Constants.MDC_REQUEST_ID)); diff --git a/src/main/java/it/gov/pagopa/wispconverter/service/DebtPositionService.java b/src/main/java/it/gov/pagopa/wispconverter/service/DebtPositionService.java index 06538c08..4e858add 100644 --- a/src/main/java/it/gov/pagopa/wispconverter/service/DebtPositionService.java +++ b/src/main/java/it/gov/pagopa/wispconverter/service/DebtPositionService.java @@ -1,6 +1,5 @@ package it.gov.pagopa.wispconverter.service; -import io.netty.channel.ConnectTimeoutException; import it.gov.pagopa.wispconverter.exception.AppErrorCodeMessageEnum; import it.gov.pagopa.wispconverter.exception.AppException; import it.gov.pagopa.wispconverter.service.mapper.DebtPositionMapper; @@ -15,8 +14,6 @@ import org.springframework.web.client.RestClientException; import java.math.BigDecimal; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @@ -181,7 +178,7 @@ private String getNAVCodeFromIUVGenerator(String creditorInstitutionCode) { it.gov.pagopa.gen.wispconverter.client.iuvgenerator.api.GenerationApi apiInstance = new it.gov.pagopa.gen.wispconverter.client.iuvgenerator.api.GenerationApi(iuvGeneratorClient); it.gov.pagopa.gen.wispconverter.client.iuvgenerator.model.IUVGenerationResponseDto response = apiInstance.generateIUV(creditorInstitutionCode, request); - navCode = response.getIuv(); + navCode = this.auxDigit + response.getIuv(); } catch (RestClientException e) { throw new AppException(AppErrorCodeMessageEnum.CLIENT_IUVGENERATOR, String.format("RestClientException ERROR [%s] - %s", e.getCause().getClass().getCanonicalName(), e.getMessage()));