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; }