@@ -46,8 +46,8 @@ class EhrResendControllerTest {
4646 private static final String FROM_ASID_CODE = "test-from-asid" ;
4747 private static final String INCUMBENT_NACK_CODE = "99" ;
4848 private static final String INCUMBENT_NACK_DISPLAY = "Unexpected condition." ;
49- private static final String CONFLICT = "CONFLICT " ;
50- private static final String GPCONNECT_ERROR_OR_WARNING_CODE = "http ://fhir.nhs.net/ ValueSet/gpconnect-error-or-warning-code -1" ;
49+ private static final String PRECONDITION_FAILED = "PRECONDITION_FAILED " ;
50+ private static final String GPCONNECT_ERROR_OR_WARNING_CODE = "https ://fhir.nhs.uk/STU3/ ValueSet/Spine-ErrorOrWarningCode -1" ;
5151 private static final String INVALID_IDENTIFIER_VALUE = "INVALID_IDENTIFIER_VALUE" ;
5252 public static final String ISSUE_CODE_VALUE = "value" ;
5353 public static final String ISSUE_CODE_BUSINESS_RULE = "business-rule" ;
@@ -129,7 +129,7 @@ void When_AnEhrExtractHasFailed_Expect_GetGpcStructuredTaskScheduledAndEhrExtrac
129129 }
130130
131131 @ Test
132- void When_AnEhrExtractHasNotFailedAndAnotherResendRequestArrives_Expect_FailedOperationOutcome () throws JsonProcessingException {
132+ void When_AnEhrExtractIsStillInProgress_Expect_FailedOperationOutcome () throws JsonProcessingException {
133133
134134 final EhrExtractStatus IN_PROGRESS_EXTRACT_STATUS = EhrExtractStatus .builder ()
135135 .conversationId (CONVERSATION_ID )
@@ -145,7 +145,7 @@ void When_AnEhrExtractHasNotFailedAndAnotherResendRequestArrives_Expect_FailedOp
145145 JsonNode rootNode = objectMapper .readTree (response .getBody ());
146146
147147 assertAll (
148- () -> assertResponseHasExpectedOperationOutcome (rootNode , CONFLICT , DIAGNOSTICS_MSG , ISSUE_CODE_BUSINESS_RULE ),
148+ () -> assertResponseHasExpectedOperationOutcome (rootNode , PRECONDITION_FAILED , DIAGNOSTICS_MSG , ISSUE_CODE_BUSINESS_RULE ),
149149 () -> assertEquals (HttpStatus .CONFLICT , response .getStatusCode ())
150150 );
151151 }
@@ -181,7 +181,7 @@ void When_AnEhrExtractHasFailed_Expect_RespondsWith202() {
181181 }
182182
183183 @ Test
184- void When_AnEhrExtractHasNotFailed_Expect_RespondsWith403 () throws JsonProcessingException {
184+ void When_AnEhrExtractHasAPositiveAcknowledgement_Expect_FailedOperationOutcome () throws JsonProcessingException {
185185
186186 String ehrMessageRef = generateRandomUppercaseUUID ();
187187 var ehrExtractStatus = new EhrExtractStatus ();
@@ -202,7 +202,7 @@ void When_AnEhrExtractHasNotFailed_Expect_RespondsWith403() throws JsonProcessin
202202 JsonNode rootNode = objectMapper .readTree (response .getBody ());
203203
204204 assertAll (
205- () -> assertResponseHasExpectedOperationOutcome (rootNode , CONFLICT , DIAGNOSTICS_MSG , ISSUE_CODE_BUSINESS_RULE ),
205+ () -> assertResponseHasExpectedOperationOutcome (rootNode , PRECONDITION_FAILED , DIAGNOSTICS_MSG , ISSUE_CODE_BUSINESS_RULE ),
206206 () -> assertEquals (HttpStatus .CONFLICT , response .getStatusCode ())
207207 );
208208 }
0 commit comments