From 99f16761fecea1fc1e9212cd2eec7582fcd2bc8f Mon Sep 17 00:00:00 2001 From: Giampiero Ferrara Date: Thu, 16 Jan 2025 13:07:54 +0100 Subject: [PATCH] Fixed test --- .../onboarding/controller/OnboardingControllerTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/controller/OnboardingControllerTest.java b/apps/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/controller/OnboardingControllerTest.java index 1a8d5d77..963edb14 100644 --- a/apps/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/controller/OnboardingControllerTest.java +++ b/apps/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/controller/OnboardingControllerTest.java @@ -1265,9 +1265,10 @@ void onboardingAggregationImportTest_KO() { void onboardingAggregationImportTest_OK() { // given OnboardingAggregationImportRequest onboardingImport = dummyOnboardingAggregationImportRequest(); + OnboardingResponse response = dummyOnboardingResponse(); Mockito.when(onboardingService.onboardingAggregationImport(any(), any(), any(), any())) - .thenReturn(Uni.createFrom().item(new OnboardingResponse())); + .thenReturn(Uni.createFrom().item(response)); // when given() @@ -1301,7 +1302,7 @@ private OnboardingAggregationImportRequest dummyOnboardingAggregationImportReque DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"); LocalDateTime dateTime = LocalDateTime.parse(str, formatter); importContract.setCreatedAt(dateTime); - onboardingRequest.setOnboardingImportContract(new OnboardingImportContract()); + onboardingRequest.setOnboardingImportContract(importContract); return onboardingRequest; }