From cf8f2338a99721f29045f50b5d5279a933199b3c Mon Sep 17 00:00:00 2001 From: JAndrewCH Date: Tue, 2 Jan 2024 15:04:25 +0000 Subject: [PATCH] fix test --- .../pscdataapi/controller/CompanyPscControllerTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/uk/gov/companieshouse/pscdataapi/controller/CompanyPscControllerTest.java b/src/test/java/uk/gov/companieshouse/pscdataapi/controller/CompanyPscControllerTest.java index 1b11c3f..4a579c5 100644 --- a/src/test/java/uk/gov/companieshouse/pscdataapi/controller/CompanyPscControllerTest.java +++ b/src/test/java/uk/gov/companieshouse/pscdataapi/controller/CompanyPscControllerTest.java @@ -349,7 +349,7 @@ void deletePSCWhenNoApiKeyPresent() throws Exception { void callPscDeleteRequest() throws Exception { doNothing() - .when(companyPscService).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID, ""); + .when(companyPscService).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID, X_REQUEST_ID); mockMvc.perform(delete(DELETE_URL) .header("ERIC-Identity", ERIC_IDENTITY) @@ -360,7 +360,7 @@ void callPscDeleteRequest() throws Exception { .header("ERIC-Authorised-Key-Privileges", ERIC_AUTH)) .andExpect(status().isOk()); - verify(companyPscService,times(1)).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID,""); + verify(companyPscService,times(1)).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID,X_REQUEST_ID); } @Test @@ -385,7 +385,7 @@ void callPscDeleteRequestAndReturn404() throws Exception { void callPscDeleteRequestWhenServiceUnavailableAndReturn503() throws Exception { doThrow(ServiceUnavailableException.class) - .when(companyPscService).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID,""); + .when(companyPscService).deletePsc(MOCK_COMPANY_NUMBER,MOCK_NOTIFICATION_ID,X_REQUEST_ID); mockMvc.perform(delete(DELETE_URL) .header("ERIC-Identity", ERIC_IDENTITY)